From: Javier Fontan Date: 2002-03-20T17:50:11+09:00 Subject: Re: Why no String#bin? Returning false should work. On Wed 20 Mar 2002 02:21, you wrote: > 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. -- Javier Fontan Mui�os jfontan@cesga.es CESGA, Supercomputing Center of Galicia