Project

General

Profile

Bug #7653

Array.pack ignores Big Endian modifier

Added by rudi pettazzi almost 4 years ago. Updated almost 4 years ago.

Status:
Feedback
Priority:
Normal
ruby -v:
ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-linux]
[ruby-core:51231]

Description

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
*16].pack('L>')
=> "\000\000\001\000"

Expected result:

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

History

#1 [ruby-core:51248] Updated by Laurent Charignon almost 4 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 [ruby-core:51316] Updated by Nobuyoshi Nakada almost 4 years ago

  • Status changed from Open to Feedback

#3 [ruby-core:51653] Updated by Koichi Sasada almost 4 years ago

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

#4 Updated by Yui NARUSE almost 4 years ago

  • Target version changed from 1.9.3 to next minor

Also available in: Atom PDF