aboutsummaryrefslogtreecommitdiffstats
path: root/vm_eval.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-23 12:10:40 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-23 12:10:40 +0000
commit9a11a067faf7efb138f4c8326448f083c1b00735 (patch)
tree2cae692acbb46c267b032915278a0ed3e0131cba /vm_eval.c
parent38b7f3f4e635ff5f41feb28b8cca23b8288ea400 (diff)
downloadruby-9a11a067faf7efb138f4c8326448f083c1b00735.tar.gz
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
Diffstat (limited to 'vm_eval.c')
-rw-r--r--vm_eval.c10
1 files changed, 5 insertions, 5 deletions
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";
}
{