From: Bruce Ingalls Date: 2002-03-20T10:21:20+09:00 Subject: Re: Why no String#bin? Paul Brannan wrote: .... > Additionally, both String#oct and String#hex return 0 on error, which > means I have no way to distinguish between an error condition and the > number zero. > > A preferable solution would be a Ruby interface to rb_str2inum. This is > still not optimal, because there is still (afaict) no way to detect bad > data. A Ruby interface to strtoul would work, but would not work with > Bignums. Cannot Ruby handle this with exceptions? Why doesn't Ruby define NaN (Not a Number), as does ANSI C++? I recall that C++ also has Undefined.