diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-10-17 05:34:51 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-10-17 05:34:51 +0000 |
commit | eccb700286af9428a402dc9fd0139e75d36c31f0 (patch) | |
tree | 9d811c344ac8f2654ca819bbd7094f2e5c98852b /vm_method.c | |
parent | c02e47c4e06f06e059bd70737082a8940c960b93 (diff) |
* vm_method.c (basic_obj_respond_to): call #respond_to_missing?
always with two arguments. [ruby-core:26090]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_method.c')
-rw-r--r-- | vm_method.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vm_method.c b/vm_method.c index bed8e61bd6..557583f5aa 100644 --- a/vm_method.c +++ b/vm_method.c @@ -1157,7 +1157,7 @@ basic_obj_respond_to(VALUE obj, ID id, int pub) case 2: return FALSE; case 0: - return RTEST(rb_funcall(obj, respond_to_missing, pub ? 1 : 2, ID2SYM(id), Qtrue)); + return RTEST(rb_funcall(obj, respond_to_missing, 2, ID2SYM(id), pub ? Qfalse : Qtrue)); default: return TRUE; } @@ -1214,7 +1214,7 @@ obj_respond_to(int argc, VALUE *argv, VALUE obj) /* * call-seq: - * obj.respond_to_missing?(symbol, include_private=false) => true or false + * obj.respond_to_missing?(symbol, include_private) => true or false * * Hook method to return whether the _obj_ can respond to _id_ method * or not. @@ -1222,7 +1222,7 @@ obj_respond_to(int argc, VALUE *argv, VALUE obj) * See #respond_to?. */ static VALUE -obj_respond_to_missing(int argc, VALUE *argv, VALUE obj) +obj_respond_to_missing(VALUE obj, VALUE priv) { return Qfalse; } @@ -1234,7 +1234,7 @@ Init_eval_method(void) #define rb_intern(str) rb_intern_const(str) rb_define_method(rb_mKernel, "respond_to?", obj_respond_to, -1); - rb_define_method(rb_mKernel, "respond_to_missing?", obj_respond_to_missing, -1); + rb_define_method(rb_mKernel, "respond_to_missing?", obj_respond_to_missing, 2); rb_define_private_method(rb_cModule, "remove_method", rb_mod_remove_method, -1); rb_define_private_method(rb_cModule, "undef_method", rb_mod_undef_method, -1); |