Bug #7653

Array.pack ignores Big Endian modifier

Added by rudi pettazzi over 1 year ago. Updated about 1 year ago.

[ruby-core:51231]
Status:Feedback
Priority:Normal
Assignee:Usaku NAKAMURA
Category:core
Target version:next minor
ruby -v:ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-linux] Backport:

Description

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

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

Expected result:

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

History

#1 Updated by Laurent Charignon over 1 year 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 over 1 year ago

  • Status changed from Open to Feedback

#3 Updated by Koichi Sasada about 1 year ago

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

#4 Updated by Yui NARUSE about 1 year ago

  • Target version changed from 1.9.3 to next minor

Also available in: Atom PDF