Bug #7653

Array.pack ignores Big Endian modifier

Added by rudi pettazzi almost 3 years ago. Updated over 2 years ago.

Assignee:Usaku NAKAMURA
ruby -v:ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-linux] Backport:


Running on Linux, it seems that L> modifier is ignored:

irb(main):024:0> [2*16].pack('L<')
=> "\000\000\001\000"
irb(main):025:0> [2
=> "\000\000\001\000"

Expected result:

irb(main):024:0> [2*16].pack('L<')
=> "\000\000\001\000"
irb(main):025:0> [2
=> "\000\001\000\000"


#1 Updated by Laurent Charignon almost 3 years ago

I can't reproduce it on Ubuntu x86_64 with Ruby(mri) 1.9.3p125, what version of Linux are you using?

#2 Updated by Nobuyoshi Nakada almost 3 years ago

  • Status changed from Open to Feedback

#3 Updated by Koichi Sasada almost 3 years ago

  • Category set to core
  • Assignee set to Usaku NAKAMURA
  • Target version set to 1.9.3

#4 Updated by Yui NARUSE over 2 years ago

  • Target version changed from 1.9.3 to next minor

Also available in: Atom PDF