summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/eval.c b/eval.c
index cd0e719461..576b98b529 100644
--- a/eval.c
+++ b/eval.c
@@ -1934,8 +1934,9 @@ is_defined(self, node, buf)
case T_MODULE:
if (rb_const_defined_at(val, node->nd_mid))
return "constant";
+ break;
default:
- if (rb_method_boundp(val, node->nd_mid, 1)) {
+ if (rb_method_boundp(CLASS_OF(val), node->nd_mid, 1)) {
return "method";
}
}
@@ -2937,7 +2938,7 @@ rb_eval(self, n)
default:
return rb_funcall(klass, node->nd_mid, 0, 0);
}
- result = rb_const_get_at(klass, node->nd_mid);
+ result = rb_const_get(klass, node->nd_mid);
}
break;