From 35b88be02b246357368dbcd5cdc83bf1dabef425 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 30 Oct 2009 07:42:04 +0000 Subject: * vm_eval.c (rb_search_method_emtry, rb_method_call_status): split from rb_call0(). * vm_eval.c (rb_check_funcall): get rid of raising exceptions and hiding further exceptions. [ruby-dev:39584] * vm_eval.c (rb_funcall_no_recursive): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_array.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test/ruby/test_array.rb') diff --git a/test/ruby/test_array.rb b/test/ruby/test_array.rb index fd3b98432d..25bf5955ec 100644 --- a/test/ruby/test_array.rb +++ b/test/ruby/test_array.rb @@ -1224,6 +1224,18 @@ class TestArray < Test::Unit::TestCase if (@cls == Array) assert_equal(a_id, a.to_ary.__id__) end + + o = Object.new + def o.to_ary + [4, 5] + end + assert_equal([1, 2, 3, 4, 5], a.concat(o)) + + o = Object.new + def o.to_ary + foo_bar() + end + assert_match(/foo_bar/, assert_raise(NoMethodError) {a.concat(o)}.message) end def test_to_s -- cgit v1.2.3