aboutsummaryrefslogtreecommitdiffstats
path: root/vm_method.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-06-03 23:06:06 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-06-04 02:12:57 +0900
commit184f78314e98cab63e7503cead4a4e99bd132a08 (patch)
tree97ba75dd05fc557a30ec400627980b9385f66ab2 /vm_method.c
parent8340c773e54feb399c9fab322e3ff6dd578ac04d (diff)
downloadruby-184f78314e98cab63e7503cead4a4e99bd132a08.tar.gz
Properly resolve refinements in defined? on private call [Bug #16932]
Diffstat (limited to 'vm_method.c')
-rw-r--r--vm_method.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/vm_method.c b/vm_method.c
index a87a8f360c..f1b71a181c 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -2358,6 +2358,12 @@ int
rb_obj_respond_to(VALUE obj, ID id, int priv)
{
rb_execution_context_t *ec = GET_EC();
+ return rb_ec_obj_respond_to(ec, obj, id, priv);
+}
+
+int
+rb_ec_obj_respond_to(rb_execution_context_t *ec, VALUE obj, ID id, int priv)
+{
VALUE klass = CLASS_OF(obj);
int ret = vm_respond_to(ec, klass, obj, id, priv);
if (ret == -1) ret = basic_obj_respond_to(ec, obj, id, !priv);