summaryrefslogtreecommitdiff
path: root/proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'proc.c')
-rw-r--r--proc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/proc.c b/proc.c
index 6424eeb4ff..bc47359e8e 100644
--- a/proc.c
+++ b/proc.c
@@ -941,6 +941,7 @@ mnew(VALUE klass, VALUE obj, ID id, VALUE mclass, int scope)
rb_method_flag_t flag = NOEX_UNDEF;
again:
+ if (klass) klass = RCLASS_ORIGIN(klass);
me = rb_method_entry_without_refinements(klass, id, &defined_class);
if (UNDEFINED_METHOD_ENTRY_P(me)) {
ID rmiss = rb_intern("respond_to_missing?");