summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index e764e5c23e..d3de7f4db9 100644
--- a/eval.c
+++ b/eval.c
@@ -7055,6 +7055,7 @@ rb_mod_modfunc(argc, argv, module)
break; /* normal case: need not to follow 'super' link */
}
m = RCLASS(m)->super;
+ if (!m) break;
}
rb_add_method(rb_singleton_class(module), id, body->nd_body, NOEX_PUBLIC);
}