summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/eval.c b/eval.c
index a2cc8bb64..bd86870d8 100644
--- a/eval.c
+++ b/eval.c
@@ -4352,6 +4352,7 @@ static int last_call_status;
#define CSTAT_PRIV 1
#define CSTAT_PROT 2
#define CSTAT_VCALL 4
+#define CSTAT_SUPER 8
static VALUE
rb_f_missing(argc, argv, obj)
@@ -4412,6 +4413,9 @@ rb_f_missing(argc, argv, obj)
exc = rb_eNameError;
}
}
+ else if (last_call_status & CSTAT_SUPER) {
+ format = "super: no superclass method `%s'";
+ }
if (!format) {
format = "undefined method `%s' for %s%s%s";
}
@@ -4807,8 +4811,7 @@ rb_call(klass, recv, mid, argc, argv, scope)
}
else if ((body = rb_get_method_body(&klass, &id, &noex)) == 0) {
if (scope == 3) {
- rb_name_error(mid, "super: no superclass method `%s'",
- rb_id2name(mid));
+ return rb_undefined(recv, mid, argc, argv, CSTAT_SUPER);
}
return rb_undefined(recv, mid, argc, argv, scope==2?CSTAT_VCALL:0);
}