summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index 1d2f424cf..1d0d62018 100644
--- a/eval.c
+++ b/eval.c
@@ -3251,7 +3251,7 @@ rb_eval(self, n)
}
}
if (nd_type(node) == NODE_ZSUPER) {
- if (ruby_frame->flags & FRAME_DMETH) {
+ if (ruby_frame->prev && (ruby_frame->prev->flags & FRAME_DMETH)) {
rb_raise(rb_eRuntimeError, "super: specify arguments explicitly");
}
argc = ruby_frame->argc;