summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-19 00:58:13 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-19 00:58:13 +0000
commit93278f2387fb2f9fe8157dd3ba537f248c558e46 (patch)
treec966725f78c53079af7d879efe0187a18dedd990 /test/ruby
parent6a875fc7248724756aa0748889d6b40dc5b6f76c (diff)
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@26124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_object.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ruby/test_object.rb b/test/ruby/test_object.rb
index 8352b03979..0a49422074 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