mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* pack.c (pack_unpack): call PACK_ITEM_ADJUST for 'Q'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
713e99cec2
commit
e8665a6bc2
3 changed files with 14 additions and 0 deletions
|
@ -491,4 +491,11 @@ class TestPack < Test::Unit::TestCase
|
|||
def test_length_too_big
|
||||
assert_raise(RangeError) { [].pack("C100000000000000000000") }
|
||||
end
|
||||
|
||||
def test_short_string
|
||||
%w[n N v V s S l L q Q].each {|fmt|
|
||||
str = [1].pack(fmt)
|
||||
assert_equal([1,nil], str.unpack("#{fmt}2"))
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue