[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

case question

Daniel Schüle

1/10/2006 1:47:00 AM

Hello,

I am a little confused

irb(main):165:0* case nil.class
irb(main):166:1> when NilClass
irb(main):167:1> puts "hier"
irb(main):168:1> when Array
irb(main):169:1> puts "dort"
irb(main):170:1> else
irb(main):171:1* puts "aaa"
irb(main):172:1> end
aaa
=> nil
irb(main):173:0> nil.class
=> NilClass
irb(main):174:0>

it must miss something
Any ideas?

Regards, Daniel