Trailing underscores handling in String's to_i different from MRI
-----------------------------------------------------------------

                 Key: JRUBY-5017
                 URL: http://jira.codehaus.org/browse/JRUBY-5017
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.4
            Reporter: Robin Salkeld


Similar to JRUBY-4424, but probably a different cause. In this case this 
expression:

  "1_".to_i

...will produce a Fixnum in MRI ruby, but a Bignum in JRuby 1.4.

Annoying since this means the set of migrated versions for a Rails plugin 
returns an array of Bignums, which don't compare eql? to Fixnums and hence 
messes up my custom migrations logic. :)

Note that the test cases added for JRUBY-4424 would catch this problem if they 
were more specific about the expected class. As they are they use == and hence 
don't notice the difference.



-- 
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