From 35a8eb05a6f670c0eba85be7a3353b761e103f14 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 19 Dec 2009 00:58:13 +0000 Subject: * vm_eval.c (check_funcall): reset method_missing_reason before trying the call. based on a patch from Yehuda Katz in [ruby-core:27219]. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@26124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_object.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test') diff --git a/test/ruby/test_object.rb b/test/ruby/test_object.rb index 8352b0397..0a4942207 100644 --- a/test/ruby/test_object.rb +++ b/test/ruby/test_object.rb @@ -322,6 +322,16 @@ class TestObject < Test::Unit::TestCase assert_raise(ArgumentError) do c.new.method_missing end + + bug2494 = '[ruby-core:27219]' + c = Class.new do + def method_missing(meth, *args) + super + end + end + b = c.new + foo rescue nil + assert_nothing_raised(bug2494) {[b].flatten} end def test_respond_to_missing -- cgit