1
0
Fork 0
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:
nobu 2009-12-19 00:58:13 +00:00
parent 6a875fc724
commit 93278f2387
3 changed files with 17 additions and 0 deletions

View file

@ -1,3 +1,9 @@
Sat Dec 19 09:58:05 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* vm_eval.c (check_funcall): reset method_missing_reason before
trying the call. based on a patch from Yehuda Katz in
[ruby-core:27219].
Sat Dec 19 09:29:22 2009 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
* lib/set.rb: Add checks that passed argument is Enumerable.

View file

@ -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

View file

@ -275,6 +275,7 @@ check_funcall(VALUE recv, ID mid, int argc, VALUE *argv)
else {
struct rescue_funcall_args args;
th->method_missing_reason = 0;
args.recv = recv;
args.sym = ID2SYM(mid);
args.argc = argc;