Skip to content

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

@dmendel

Description

@dmendel
$ 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions