summaryrefslogtreecommitdiff
path: root/test/ruby/test_array.rb
diff options
context:
space:
mode:
authormarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-22 22:30:45 +0000
committermarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-22 22:30:45 +0000
commitcb0093d54552cff4c1c914973ffe30e7d175cd64 (patch)
treead166874a4ae786b943dd1798e8d99e5ecae364d /test/ruby/test_array.rb
parent4edd787b140737172ff8f74ac556ce7b9c58e8d6 (diff)
* array.c: Avoid zip bug by not using obsolete rb_check_block_call [Bug #8153]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_array.rb')
-rw-r--r--test/ruby/test_array.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_array.rb b/test/ruby/test_array.rb
index 17f2ef66c4..a8b514c830 100644
--- a/test/ruby/test_array.rb
+++ b/test/ruby/test_array.rb
@@ -1918,6 +1918,15 @@ class TestArray < Test::Unit::TestCase
assert_equal([['a', 5], ['b', 6]], %w(a b).zip(ary))
end
+ def test_zip_bug
+ bug8153 = "ruby-core:53650"
+ r = 1..1
+ def r.respond_to?(*)
+ super
+ end
+ assert_equal [[42, 1]], [42].zip(r), bug8153
+ end
+
def test_transpose
assert_equal([[1, :a], [2, :b], [3, :c]],
[[1, 2, 3], [:a, :b, :c]].transpose)