[Bug #2792] String#to_f on Ruby-1.8.6-p399

Bug #2792: String#to_f on Ruby-1.8.6-p399
http://redmine.ruby-lang.org/issues/show/2792

e$B5/I<<Te(B: Masao M.
e$B%9%F!<%?%9e(B: Open, e$BM%@hEYe(B: Normal
ruby -v: ruby 1.8.6 (2010-02-05 patchlevel 399) [x86_64-linux]

Ruby-1.8.6e$B$Ne(BString#to_fe$B$G!">.?tE@$N07$$$,$*$+$7$$$h$&$G$9!#e(B

% ruby -v -e ‘p “0.7”.to_f’
ruby 1.8.6 (2010-02-05 patchlevel 399) [x86_64-linux]
7.0

% ruby -v -e ‘p “0.7”.to_f’
ruby 1.8.7 (2010-01-10 patchlevel 249) [x86_64-linux]
0.7

e$B%A%1%C%He(B #2792 e$B$,99?7$5$l$^$7$?!#e(B (by Run Paint Run R.)

I suspect I’m seeing a symptom of the same problem. Just installed “ruby
1.8.6 (2010-03-05 patchlevel 400) [i686-linux]” from source, and found
floats to be horribly broken.

1.3.to_int
=> 13
irb(main):002:0> 1.3.ceil
=> 13
irb(main):003:0> 2 + 0.5
=> 7.0

Am I missing a dependency or is this a regression?

http://redmine.ruby-lang.org/issues/show/2792

e$B1sF#$G$9!#e(B

Ruby-1.8.6e$B$Ne(BString#to_fe$B$G!">.?tE@$N07$$$,$*$+$7$$$h$&$G$9!#e(B

% ruby -v -e ‘p “0.7”.to_f’
ruby 1.8.6 (2010-02-05 patchlevel 399) [x86_64-linux]
7.0

gcc 4.4.1 e$B$r;H$C$F$$$^$;$s$+!)e(B
[ruby-core:26937] [ruby-core:28037] e$B$GF1MM$NJs9p$,$"$j!"e(B
gcc 4.4.1 e$B$N%P%0$N$;$$$G$O$J$$$+$H$$$&$3$H$G$9!#e(B

gcc 4.3 e$B$+e(B gcc 4.4.2 e$B$J$iBg>fIW$@$=$&$G$9!#e(B

e$B%A%1%C%He(B #2792 e$B$,99?7$5$l$^$7$?!#e(B (by Run Paint Run R.)

Bah. I’d missed that thread. Thanks, Yusuke.

http://redmine.ruby-lang.org/issues/show/2792