Why does
a = *(1..10)
=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
but
*(1..10)
SyntaxError: unexpected '\n', expecting '.' or &. or :: or '['
(I'd have thought it would return the same as in the first case, but that it simply wouldn't do any assignment). Curious to know if the reason for this is ruby related, or more specifically related to splat (*
)