From 9a11a067faf7efb138f4c8326448f083c1b00735 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 23 Oct 2015 12:10:40 +0000 Subject: error.c: separate class names * error.c (name_err_mesg_to_str): separate class names from the receiver description. * vm_eval.c (make_no_method_exception, raise_method_missing): add format specifiers for class names. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_eval.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'vm_eval.c') diff --git a/vm_eval.c b/vm_eval.c index 121e2f15bd..ed8bf42496 100644 --- a/vm_eval.c +++ b/vm_eval.c @@ -677,7 +677,7 @@ make_no_method_exception(VALUE exc, const char *format, VALUE obj, int argc, con VALUE args[3]; if (!format) { - format = "undefined method `%s' for %s"; + format = "undefined method `%s' for %s%s%s"; } args[n++] = rb_name_err_mesg_new(rb_str_new_cstr(format), obj, argv[0]); args[n++] = argv[0]; @@ -706,17 +706,17 @@ raise_method_missing(rb_thread_t *th, int argc, const VALUE *argv, VALUE obj, stack_check(); if (last_call_status & MISSING_PRIVATE) { - format = "private method `%s' called for %s"; + format = "private method `%s' called for %s%s%s"; } else if (last_call_status & MISSING_PROTECTED) { - format = "protected method `%s' called for %s"; + format = "protected method `%s' called for %s%s%s"; } else if (last_call_status & MISSING_VCALL) { - format = "undefined local variable or method `%s' for %s"; + format = "undefined local variable or method `%s' for %s%s%s"; exc = rb_eNameError; } else if (last_call_status & MISSING_SUPER) { - format = "super: no superclass method `%s' for %s"; + format = "super: no superclass method `%s' for %s%s%s"; } { -- cgit v1.2.3