aboutsummaryrefslogtreecommitdiffstats
path: root/numeric.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-15 08:16:40 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-15 08:16:40 +0000
commitc1b4b10a120b2f0b206414161d4f208fb1c37e62 (patch)
tree120b0d96f874035cbf48a5439aa89ef6cce29dd3 /numeric.c
parent3ea61a2cf5188ac436284d9cc9f8c444df9995c0 (diff)
downloadruby-c1b4b10a120b2f0b206414161d4f208fb1c37e62.tar.gz
numeric.c: preserve encoding
* numeric.c (num_sadded): preserve encoding of error message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/numeric.c b/numeric.c
index c207fbf521..3ceb5ae2d2 100644
--- a/numeric.c
+++ b/numeric.c
@@ -317,9 +317,9 @@ num_sadded(VALUE x, VALUE name)
/* ruby_frame = ruby_frame->prev; */ /* pop frame for "singleton_method_added" */
rb_remove_method_id(rb_singleton_class(x), mid);
rb_raise(rb_eTypeError,
- "can't define singleton method \"%s\" for %s",
- rb_id2name(mid),
- rb_obj_classname(x));
+ "can't define singleton method \"%"PRIsVALUE"\" for %"PRIsVALUE,
+ rb_id2str(mid),
+ rb_obj_class(x));
UNREACHABLE;
}