From: nobu.nokada@... Date: 2002-01-11T02:59:41+09:00 Subject: Hexadecimal float (Re: regexen for strings that can be converted to numbers) Hi, At Fri, 11 Jan 2002 01:59:41 +0900, Tobias Reif wrote: > > class String > > def to_number > > Integer(self) rescue Float(self) rescue self > > end > > end > > Elegance lies in the beauty of condensed truth :) I found; "0x_0".to_number # => 0.0 "0x1.0".to_number # => 0.0 "0x1.01".to_number # => 1.00390625 strtod() on Linux (or glibc) seems to accept radix prefix. Is this Linux specific? Also intended? -- Nobu Nakada