From: dagbrown@... (Dave Brown) Date: 2003-08-21T15:52:53+09:00 Subject: Re: Star in case statements In article , Martin DeMello wrote: : Hal E. Fulton wrote: : > I just noticed something that I either didn't know : > or just forgot. :) : > : > You can use the *array notation to specify values : > for the when clause in a case statement: : : Very neat! I was gratified when I first discovered you could splat a : range too (as in a = *(1..10)). 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. --Dave -- `I did eventually find a mail-order anvil supplier over the Internet. I'm not sure how they ship them, but in case they're delivered by air, I better get my tiny umbrella ready, and keep a sign saying "(yipe)" in my pocket.' -- James "Kibo" Parry