Math.hypot(0.0 / 0, 0.0) throws an Errno::EDOM instead of returning a NaN value. MRI and JRuby return a Float instance
(NaN value). See below:
IronRuby (SVN r181):
>>> Math.hypot(0.0 / 0, 0.0)
C:\Sviluppo\ironruby\SVN\trunk\src\IronRuby.Libraries\Builtins\RubyMath.cs:133:in `hypot':
Domain error - Domain error - hypot (Errno::EDOM)
from :0
MRI 1.8.6
irb(main):001:0> Math.hypot(0.0 / 0, 0.0)
=> NaN
I guess this different behaviour could be easily fixed by simply removing the call to the DomainCheck method in the
Hypot method of IronRuby.Builtins.RubyMath. |