Inconsistent handling of Fixnum/Bignum boundary
-----------------------------------------------

                 Key: JRUBY-4109
                 URL: http://jira.codehaus.org/browse/JRUBY-4109
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.3.1
         Environment: jruby 1.3.1 (ruby 1.8.6p287) (2009-07-10 6586) (Java 
HotSpot(TM) Client VM 1.6.0_15) [i386-java]
            Reporter: Alex Coles


I realize the boundaries between Fixnum/Bignum are different between JRuby and 
MRI (http://jira.codehaus.org/browse/JRUBY-1587), however the boundaries appear 
to be inconsistent:

{{
[alexbco...@mondiale ~]$ jirb
irb(main):001:0> -9223372036854775808.class
=> Bignum
irb(main):002:0> "-9223372036854775808".to_i
=> -9223372036854775808
irb(main):003:0> "-9223372036854775808".to_i.class
=> Fixnum
}}

{{
[alexbco...@mondiale ~]$ irb
>> -9223372036854775808.class
=> Bignum
>> "-9223372036854775808".to_i
=> -9223372036854775808
>> "-9223372036854775808".to_i.class
=> Bignum
}}

(See also http://gist.github.com/212317)

This is causing an issue in one of our DataMapper tests where we call eql? on a 
DataMapper model with an Integer property and compare the original and the 
serialized/deserialized property. See http://gist.github.com/212127


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