Guest User

Untitled

a guest
Apr 20th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. a = *(0..9)
  2. # => [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
  3.  
  4. a = [*(0..9)]
  5. # => [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
  6.  
  7. [*(0..9)]
  8. # => [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
  9.  
  10. *(0..9)
  11. # SyntaxError ((irb):17: syntax error, unexpected '\n', expecting &. or :: or '[' or '.')
  12. # *(0..9)
  13. # ^
Add Comment
Please, Sign In to add comment