From: Pit Capitain Date: 2004-07-08T07:51:47+09:00 Subject: Re: Class#=== has interesting results David A. Black schrieb: > As for the first, and Charles's question about why it doesn't work > that way: look again at my earlier example: > > case s > when String ... > > With the "is_a? or ==" implementation, this 'when' clause could mean > either that s is String (the Class object) or that s is "Hi, how are > you?" (a String object). Knowing that something is either String or a > string, but not knowing which, isn't very valuable; it's hard to imagine > a case where you would act on that kind of information. Ack. And a question to the OP: why do you want to apply the case statement to classes instead of to their instances? What should this case statement do (depending on which class is given)? Maybe we can find an alternative to what you think you need. Regards, Pit