1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

test/ruby/test_pack.rb: fix test case added by r57187

The test case for String#unpack added by r57187 is not properly testing
because the String will be filled after the block invocation.
[ruby-core:78841] [Bug #13075]

Thanks to nagachika for pointing this out:

  http://d.hatena.ne.jp/nagachika/20161226/ruby_trunk_changes_57184_57194#r57187

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
rhe 2016-12-29 16:16:32 +00:00
parent e383c2ea46
commit c326ab8c74

View file

@ -841,7 +841,7 @@ EXPECTED
def test_unpack_with_block
ret = []; "ABCD".unpack("CCCC") {|v| ret << v }
assert_equal [65, 66, 67, 68], ret
ret = []; "A".unpack("B*") {|v| ret << v }
ret = []; "A".unpack("B*") {|v| ret << v.dup }
assert_equal ["01000001"], ret
end