summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-23 17:03:48 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-23 17:03:48 +0000
commit25bab786cb416aa491ff62e6d9b6ba196251bfc6 (patch)
treef36188efb63432fac183d7ac18ab3c3b7968a8f1 /string.c
parentb58802a3c145f9bade0bb31c759f090d3fba46c9 (diff)
string.c: preserve encoding of global variable
* string.c (rb_str_setter): preserve encoding of global variable name in error message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/string.c b/string.c
index 1fb78ec9ce..4a0df2aecb 100644
--- a/string.c
+++ b/string.c
@@ -7998,7 +7998,7 @@ void
rb_str_setter(VALUE val, ID id, VALUE *var)
{
if (!NIL_P(val) && !RB_TYPE_P(val, T_STRING)) {
- rb_raise(rb_eTypeError, "value of %s must be String", rb_id2name(id));
+ rb_raise(rb_eTypeError, "value of %"PRIsVALUE" must be String", rb_id2str(id));
}
*var = val;
}