Issue #1735 has been updated by Paul Hinze.


Same issue here on fresh install of ArchLinux with gcc 4.4.1:

  $ ruby -e 'p 1867216.25'
  186721625.0

As per tadayoshi funaba's suggestion, I rebuilt ruby-1.8.6-p286 after editing the root Makefile like so:

  - CFLAGS = -g -O2 -DRUBY_EXPORT -D_GNU_SOURCE=1 
  + CFLAGS = -g -DRUBY_EXPORT -D_GNU_SOURCE=1

And that solved the problem for me, at least in date.rb.  I'm a little worried about what optimization bugs might be lurking elsewhere.

So is there something we should be doing to prevent this from happening to other users?  I'm not very familiar with Ruby's C source but I'm willing to dive in if someone points me in the right direction.
----------------------------------------
http://redmine.ruby-lang.org/issues/show/1735

----------------------------------------
http://redmine.ruby-lang.org