Issue #7653 has been updated by laurent3814 (Laurent Charignon).


I can't reproduce it on Ubuntu x86_64 with Ruby(mri) 1.9.3p125, what version of Linux are you using?
----------------------------------------
Bug #7653: Array.pack ignores Big Endian modifier
https://bugs.ruby-lang.org/issues/7653#change-35214

Author: rudolone (rudi pettazzi)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-linux] 


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"



-- 
http://bugs.ruby-lang.org/