Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Integer(nil) and checking numericality

Reply
Thread Tools

Integer(nil) and checking numericality

 
 
eastcoastcoder@gmail.com
Guest
Posts: n/a
 
      03-10-2006
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 )/

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
to check for numericality Sijo Kg Ruby 11 05-08-2008 07:54 PM
A little off-topic: Looking for ideas re. CRL Checking and Tomcat ohaya Java 1 08-20-2004 11:25 PM
Checking Yahoo and Excite email in Thunderbird Scott Nelson Firefox 1 05-20-2004 03:03 AM
Opening and checking VPN's Hugh Mackay Java 0 03-03-2004 11:16 AM
checking for secure connection and rediecting Rob ASP .Net 3 02-23-2004 06:44 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57