Skip to content

Instantly share code, notes, and snippets.

@guinslym
Created January 16, 2014 03:03
Show Gist options
  • Save guinslym/8449162 to your computer and use it in GitHub Desktop.
Save guinslym/8449162 to your computer and use it in GitHub Desktop.
Hi! (1..9).to_a gives me an array. and [*1..9] gives me also an array but I don't understand the * character cause it's not a function where can I find the doc for * (does it have a special name cause I don't find the info in the doc)
Hi! (1..9).to_a gives me an array. and [*1..9] gives me also an array but I don't understand the * character cause it's not a function where can I find the doc for * (does it have a special name cause I don't find the info in the doc)
@guinslym
Copy link
Author

http://endofline.wordpress.com/2011/01/21/the-strange-ruby-splat/
guinslym: magic word to google is 'splat'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment