diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-01 13:35:32 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-01 13:35:32 +0000 |
commit | ccebd9b016c31d3c5f7ed55eb60066fa9425a439 (patch) | |
tree | 6978b565486e1f23dafc8cea348c546d946d5920 /vm_method.c | |
parent | 095022cbe91ff03af27c19bbe47a819e1323f004 (diff) | |
download | ruby-ccebd9b016c31d3c5f7ed55eb60066fa9425a439.tar.gz |
vm_method.c: private
* vm_method.c (basic_obj_respond_to): call even if private.
[Feature #6539]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_method.c')
-rw-r--r-- | vm_method.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/vm_method.c b/vm_method.c index d5140f59d5..9727a2ada8 100644 --- a/vm_method.c +++ b/vm_method.c @@ -1430,12 +1430,15 @@ static inline int basic_obj_respond_to(VALUE obj, ID id, int pub) { VALUE klass = CLASS_OF(obj); + VALUE args[2]; switch (rb_method_boundp(klass, id, pub|NOEX_RESPONDS)) { case 2: return FALSE; case 0: - return RTEST(rb_funcall(obj, respond_to_missing, 2, ID2SYM(id), pub ? Qfalse : Qtrue)); + args[0] = ID2SYM(id); + args[1] = pub ? Qfalse : Qtrue; + return RTEST(rb_funcall2(obj, respond_to_missing, 2, args)); default: return TRUE; } |