From: Ilmari Heikkinen Date: 2005-04-27T05:21:05+09:00 Subject: Re: Announcing Reg 0.4.0 On 26.4.2005, at 20:35, Christian Neukirchen wrote: > It is already very confusing that String !=== String (what is the most > elegant way to case compare classes against classes, btw?). I don't know about elegant, but this is probably the way that requires least typing: def make_new(klass) case [klass] when [String]: "foo" when [Fixnum]: 27 when [Array]: [nil, nil, true] end end make_new String => "foo" Ilmari Heikkinen -- 66. The regions beyond these places are either difficult of access because of their excessive winters and great cold, or else cannot be sought out because, of some divine influence of the gods.