* vm_eval.c (check_funcall_failed): should rescue user raised
NoMethodError. rescue all NoMethodError if receiver does not respond to the method name. [ruby-dev:39796] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3f664b30fc
commit
be21eb5d0f
@ -1,3 +1,9 @@
|
|||||||
|
Sat Nov 28 09:05:53 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* vm_eval.c (check_funcall_failed): should rescue user raised
|
||||||
|
NoMethodError. rescue all NoMethodError if receiver does not
|
||||||
|
respond to the method name. [ruby-dev:39796]
|
||||||
|
|
||||||
Thu Nov 26 21:14:30 2009 Yuki Sonoda (Yugui) <yugui@yugui.jp>
|
Thu Nov 26 21:14:30 2009 Yuki Sonoda (Yugui) <yugui@yugui.jp>
|
||||||
|
|
||||||
* test/ruby/test_complex.rb (@unify): fix the detection if math
|
* test/ruby/test_complex.rb (@unify): fix the detection if math
|
||||||
|
@ -255,10 +255,9 @@ check_funcall_exec(struct rescue_funcall_args *args)
|
|||||||
static VALUE
|
static VALUE
|
||||||
check_funcall_failed(struct rescue_funcall_args *args, VALUE e)
|
check_funcall_failed(struct rescue_funcall_args *args, VALUE e)
|
||||||
{
|
{
|
||||||
VALUE sym = rb_funcall(e, rb_intern("name"), 0, 0);
|
if (rb_respond_to(args->recv, args->sym)) {
|
||||||
|
|
||||||
if (args->sym != sym)
|
|
||||||
rb_exc_raise(e);
|
rb_exc_raise(e);
|
||||||
|
}
|
||||||
return Qundef;
|
return Qundef;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user