Possible Duplicate:
What is the * operator doing to this string in Ruby
Probably there is answer for that elsewhere, but I just don't know how to find it...
If I am right, the *
means multiple parameters if used in function definition:
def hero(name, *super_powers)
But what does *
do in the code like this:
Hash[*[[:first_name, 'Shane'], [:last_name, 'Harvie']].flatten] # => {:first_name=>"Shane", :last_name=>"Harvie"}