[1.9] (1.0/0).to_r falls into infinite loop
-------------------------------------------

                 Key: JRUBY-4312
                 URL: http://jira.codehaus.org/browse/JRUBY-4312
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules, Ruby 1.9
    Affects Versions: JRuby 1.4
         Environment: github trunk, Java 6, Mac OS X 10.6.2
            Reporter: Hiro Asari
             Fix For: JRuby 1.5
         Attachments: 0001-1.9-1.0-0-.to_r-falls-into-infinite-loop.patch

...or, more precisely, org.jruby.util.Numeric.frexp never returns if the first 
argument is Infinity.

According to frexp(3):

     frexp(+-infinity, exp) returns +-infinity, and stores an unspecified
     value in the object pointed to by exp.

     frexp(Nan, exp) returns a Nan, and stores an unspecified value in the
     object pointed to by exp.

This is in SUSv2: http://opengroup.org/onlinepubs/007908775/xsh/frexp.html (and 
probably other more recent specifications as well). 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to