Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 269795 - dev-lang/ruby-1.8.6_p368: eval "0.0/0.0": warning: Float 0.0 out of range
Summary: dev-lang/ruby-1.8.6_p368: eval "0.0/0.0": warning: Float 0.0 out of range
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Low minor (vote)
Assignee: Gentoo Ruby Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-14 08:21 UTC by Pavel Suchmann
Modified: 2010-08-08 11:05 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Suchmann 2009-05-14 08:21:29 UTC
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?
Comment 1 Hans de Graaff gentoo-dev Security 2009-05-14 09:00:26 UTC
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
Comment 2 Hans de Graaff gentoo-dev Security 2010-08-08 11:05:43 UTC
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]