-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Milestone
Description
Environment Information
Provide at least:
- JRuby version (
jruby -v) and command line (flags, JRUBY_OPTS, etc):jruby 9.4.1.0-SNAPSHOT (3.1.0) 2023-01-05 006cf2b9c4 OpenJDK 64-Bit Server VM 17.0.5+8 on 17.0.5+8 +jit [x86_64-linux] - Operating system and platform (e.g.
uname -a): Linux
Expected Behavior
MRI and TruffleRuby:
$ ruby -e 'p(1 << (2**40))'
-e: failed to allocate memory (NoMemoryError)
$ ruby -e 'p(1 << (2**64))'
-e: failed to allocate memory (NoMemoryError)
Actual Behavior
JRuby:
$ ruby -e 'p(1 << (2**40))'
1
$ ruby -e 'p(1 << (2**64))'
RangeError: bignum too big to convert into `long'
<< at org/jruby/RubyBignum.java:912
<< at org/jruby/RubyFixnum.java:1285
<main> at -e:1
... 4 levels...
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels