I have observed a suspicious warning in 1.8.6.368 when evaluating NaN immediately after Infinity: $ ruby -vwe 'Math::exp Math::exp(42); eval "0.0/0.0"' ruby 1.8.6 (2009-03-31 patchlevel 368) [i686-linux] (eval):1: warning: Float 0.0 out of range Without reaching Infinity first, there is no such warning produced: $ ruby -vwe 'eval "0.0/0.0"' ruby 1.8.6 (2009-03-31 patchlevel 368) [i686-linux] It seems an older patchlevel of 1.8.6 behaves differently: $ ruby -vwe 'Math::exp Math::exp(42); eval "0.0/0.0"' ruby 1.8.6 (2008-03-03 patchlevel 114) [i686-linux] The 1.9 version of ruby remains silent as well (which is imho correct behavior): $ ruby -vwe 'Math::exp Math::exp(42); eval "0.0/0.0"' ruby 1.9.1p0 (2009-01-30 revision 21907) [i686-linux] Am I missing something?
This is already broken in ruby 1.8.6 pl 287: ruby 1.8.6 (2008-08-11 patchlevel 287) [x86_64-linux] (eval):1: warning: Float 0.0 out of range
This appears to be fixed in p299, so I'm closing this bug: $ruby -vwe 'Math::exp Math::exp(42); eval "0.0/0.0"' ruby 1.8.7 (2010-06-23 patchlevel 299) [x86_64-linux]