From abeedb0875f3fb8e8d1329b8dc885b159cb61841 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 19 Sep 2012 15:42:26 +0000 Subject: array.c, enum.c: TypeError in zip * array.c (take_items), enum.c (enum_zip): raise TypeError at non-enumerable objects, not NoMethodError. [ruby-dev:46145] [Bug #7038] * vm_eval.c (rb_check_block_call): check_funcall variant with block function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_array.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/ruby/test_array.rb') diff --git a/test/ruby/test_array.rb b/test/ruby/test_array.rb index 137c124f60..60b08cd1bc 100644 --- a/test/ruby/test_array.rb +++ b/test/ruby/test_array.rb @@ -1890,7 +1890,7 @@ class TestArray < Test::Unit::TestCase ary = Object.new def ary.to_a; [1, 2]; end - assert_raise(NoMethodError){ %w(a b).zip(ary) } + assert_raise(TypeError, NoMethodError) {%w(a b).zip(ary)} def ary.each; [3, 4].each{|e|yield e}; end assert_equal([['a', 3], ['b', 4]], %w(a b).zip(ary)) def ary.to_ary; [5, 6]; end -- cgit v1.2.3