mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
6a875fc724
commit
93278f2387
3 changed files with 17 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue