Skip to content

Instantly share code, notes, and snippets.

@johndel
Created April 4, 2013 10:38
Show Gist options
  • Save johndel/5309406 to your computer and use it in GitHub Desktop.
Save johndel/5309406 to your computer and use it in GitHub Desktop.
It returns Favorite Game: ["Mario", "Contra", "Metroid"] instead of looping through array. Guess why :)
def describe_favorites(*games)
games.each do |game|
puts "Favorite Game: #{game}"
end
end
describe_favorites(['Mario', 'Contra', 'Metroid'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment