Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Array#pack difference between jruby 1.7.10 and ruby 1.9.3 #1478

Closed
dmendel opened this issue Feb 4, 2014 · 2 comments
Closed

Array#pack difference between jruby 1.7.10 and ruby 1.9.3 #1478

dmendel opened this issue Feb 4, 2014 · 2 comments
Milestone

Comments

@dmendel
Copy link

dmendel commented Feb 4, 2014

$ ruby --version
ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-linux]

$ ruby -e 'p [0xfffffffffffffffff].pack("C")' 
"\xFF"
$ ruby --version                                   
jruby 1.7.10 (1.9.3p392) 2014-01-09 c4ecd6b on OpenJDK 64-Bit Server VM 1.7.0_51-b00 [linux-amd64]

$ ruby -e 'p [0xfffffffffffffffff].pack("C")'
RangeError: bignum too big to convert into `long'
    pack at org/jruby/RubyArray.java:4129
  (root) at -e:1
@lucasallan
Copy link
Member

I'll take a look on it. Thanks @dmendel

lucasallan added a commit to lucasallan/jruby that referenced this issue Feb 7, 2014
lucasallan added a commit to lucasallan/jruby that referenced this issue Feb 7, 2014
lucasallan added a commit to lucasallan/jruby that referenced this issue Feb 7, 2014
@DavidEGrayson
Copy link
Contributor

I encountered this issue today in JRuby 1.7.11.

It is interesting compared to other JRuby bugs because it can be reproduced with so few characters:

[1<<99].pack ?C

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants