From: Robert Dober Date: 2007-06-10T20:50:06+09:00 Subject: Re: fun with "case" On 6/10/07, Robert Klemme wrote: > On 10.06.2007 12:49, Joachim Glauche wrote: > > Why not do a simply use > > > > case [1,2,3].size > > > > instead? > > Because a) it's too simple and bloody obvious, b) less fun (see subject > :-)) and c) it does not work if you also have other criteria (i.e. which > do not use the size but content). :-) or in other words you can write case list when [] puts :empty when 1 puts :not_empty else puts :close_to_infinity end as a matter of fact writing case list.size becomes an unnecessary early commitment!!! T'is really kool Robert Cheers Robert > > Kind regards > > robert > > -- You see things; and you say Why? But I dream things that never were; and I say Why not? -- George Bernard Shaw