Oops! A little typo... args.each_with_index do |args, n| ....should be: args.each_with_index do |arg, n|