summaryrefslogtreecommitdiff
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
commit5bf61f45408435904c2d635b2004fd3235eca68d (patch)
tree2cae692acbb46c267b032915278a0ed3e0131cba /vm_eval.c
parente3b0788378d259125c52aee554afe9845e012c19 (diff)
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 121e2f1..ed8bf42 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";
}
{