[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Integer(nil) and checking numericality

eastcoastcoder

3/10/2006 3:13:00 AM

Why does Integer(nil) return 0? Isn't the point of Integer to assert
that the arg is actually an integer? (If we just want a best guess, we
can do '323aaadsfwefsd'.to_i or ''.to_i )/