Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = *(0..9)
- # => [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
- a = [*(0..9)]
- # => [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
- [*(0..9)]
- # => [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
- *(0..9)
- # SyntaxError ((irb):17: syntax error, unexpected '\n', expecting &. or :: or '[' or '.')
- # *(0..9)
- # ^
Add Comment
Please, Sign In to add comment