* pack.c (pack_pack): fix more than one modifiers appear in the

format string. [ruby-core:32793]

* pack.c (pack_unpack): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2010-10-15 07:42:21 +00:00
parent dfd139b819
commit ccaf61d5af
3 changed files with 11 additions and 2 deletions

View file

@ -145,6 +145,8 @@ class TestPack < Test::Unit::TestCase
else
_integer_little_endian()
end
assert_equal("\x01\x02\x02\x01", [0x0102,0x0102].pack("s>s<"))
assert_equal([0x0102,0x0102], "\x01\x02\x02\x01".unpack("s>s<"))
end
def test_integer_endian_explicit