summaryrefslogtreecommitdiff
path: root/insns.def
diff options
context:
space:
mode:
Diffstat (limited to 'insns.def')
-rw-r--r--insns.def11
1 files changed, 9 insertions, 2 deletions
diff --git a/insns.def b/insns.def
index 23c0143907..f75007dca2 100644
--- a/insns.def
+++ b/insns.def
@@ -799,8 +799,15 @@ defined
}
}
}
- if (RTEST(rb_funcall(v, rb_intern("respond_to_missing?"), 2, obj, Qfalse)))
- expr_type = "method";
+ {
+ VALUE args[2];
+ VALUE r;
+
+ args[0] = obj; args[1] = Qfalse;
+ r = rb_check_funcall(v, rb_intern("respond_to_missing?"), 2, args);
+ if (r != Qundef && RTEST(r))
+ expr_type = "method";
+ }
break;
}
case DEFINED_YIELD: