Bignum and Fixnum incompatibility.
----------------------------------
Key: JRUBY-5129
URL: http://jira.codehaus.org/browse/JRUBY-5129
Project: JRuby
Issue Type: Bug
Components: Application Error
Affects Versions: JRuby 1.5.3
Environment: Linux gridlink 2.6.32-24-generic #43-Ubuntu SMP Thu Sep
16 14:58:24 UTC 2010 x86_64 GNU/Linux
jruby-1.5.3 [ amd64-java ]
openjdk-6-jre 6b18-1.8.1-0ubuntu1
Reporter: Yann Golanski
I am getting the following incompatibility between Fixnum and Bignum on jruby
on linux.
jruby-1.5.3 > rand(2**64)
=> 8609428970434218151
jruby-1.5.3 > Integer("8609428970434218151").class
=> Bignum
jruby-1.5.3 > 8609428970434218151.class
=> Fixnum
jruby-1.5.3 > Integer("8609428970434218151") == 8609428970434218151
=> true
jruby-1.5.3 >
{Integer("8609428970434218151")=>'ook?'}.has_key?(8609428970434218151)
=> false
jruby-1.5.3 >
{8609428970434218151=>'eek?'}.has_key?(Integer("8609428970434218151"))
=> false
This looks like a bug to me but I could have missed something.
--
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