[1.9] Fixnum#** sometimes returns wrong Bignum
----------------------------------------------

                 Key: JRUBY-5693
                 URL: http://jira.codehaus.org/browse/JRUBY-5693
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules, Ruby 1.9.2
    Affects Versions: JRuby 1.6
            Reporter: Masaki Ishihara


Fixnum#** sometimes returns wrong Bignum in 1.9 mode.

$ jruby -v --1.9 -e '10.times {|i| puts "#{(n = 2 ** i).class} #{n}" }'
jruby 1.6.0 (ruby 1.9.2 patchlevel 136) (2011-03-15 f3b6154) (Java HotSpot(TM) 
64-Bit Server VM 1.6.0_24) [linux-amd64-java]
Fixnum 1
Fixnum 2
Fixnum 4
Bignum 8
Fixnum 16
Bignum 32
Fixnum 64
Bignum 128
Fixnum 256
Bignum 512

The following is right behavior.

$ jruby -v --1.8 -e '10.times {|i| puts "#{(n = 2 ** i).class} #{n}" }'
jruby 1.6.0 (ruby 1.8.7 patchlevel 330) (2011-03-15 f3b6154) (Java HotSpot(TM) 
64-Bit Server VM 1.6.0_24) [linux-amd64-java]
Fixnum 1
Fixnum 2
Fixnum 4
Fixnum 8
Fixnum 16
Fixnum 32
Fixnum 64
Fixnum 128
Fixnum 256
Fixnum 512


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