diff options
author | rhe <rhe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-12-29 16:16:32 +0000 |
---|---|---|
committer | rhe <rhe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-12-29 16:16:32 +0000 |
commit | c326ab8c743c342150f5d5f991ddd6f429ebdfa1 (patch) | |
tree | 92e62ef7af3c2a5e9d723cdc5c8cc7e2cb48e30d /test/ruby/test_pack.rb | |
parent | e383c2ea4616fb38f3b571b74d5fea8178da8705 (diff) |
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
Diffstat (limited to 'test/ruby/test_pack.rb')
-rw-r--r-- | test/ruby/test_pack.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ruby/test_pack.rb b/test/ruby/test_pack.rb index 81b1a92383..6d2eecbc9f 100644 --- a/test/ruby/test_pack.rb +++ b/test/ruby/test_pack.rb @@ -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 |