Dave Brown <dagbrown / lart.ca> wrote: > > This is weird though: > > irb(main):001:0> *(1..10) > SyntaxError: compile error > (irb):1: syntax error > from (irb):1 > irb(main):002:0> a=*(1..10) > => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] > irb(main):003:0> > > I wonder why that does that. *(1..10) doesn't expand to [1,2,3,4,5,6,7,8,9,10], it expands to 1,2,3,4,5,6,7,8,9,10. a = 1,2,3,4,5,6,7,8,9,10 does the right thing (see the multiple assignment section of the pickaxe book). [*(1..10)] works too. martin