summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vm.c b/src/vm.c
index 3023710d4..7b38659a7 100644
--- a/src/vm.c
+++ b/src/vm.c
@@ -1288,7 +1288,7 @@ RETRY_TRY_BLOCK:
int a = GETARG_A(i);
int n = GETARG_C(i);
- if (mid == 0) {
+ if (mid == 0 || !mrb->c->ci->target_class) {
mrb_value exc;
exc = mrb_exc_new_str_lit(mrb, E_NOMETHOD_ERROR, "super called outside of method");