Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.5.2
-
Fix Version/s: JRuby 1.6RC1
-
Component/s: Parser
-
Labels:None
-
Number of attachments :
Description
The following script should alternate between being a Fixnum and a Bignum since the negated value will fit into a Fixnum when negative but need to be promoted to a Bignum for the positive value. MRI also behaves this like, but with a lower value since we use a long for our Fixnums:
./bin/jruby -e 'p (9223372036854775808).class, (-9223372036854775808).class, (--9223372036854775808).class, (---9223372036854775808).class'
Most obscure bug eva. Fixed in commit 4311721e1db42ae3c6cec07a4061a8c9e68a9f52 on master.