diff --git a/ChangeLog b/ChangeLog index 5acf7060cf..4663d1c22c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Jul 30 23:28:10 2014 Kazuki Tsujimoto + + * sprintf.c (rb_str_format): like r47006, get rid of + function calls in RSTRING_PTR(). + Wed Jul 30 22:10:29 2014 Kazuki Tsujimoto * process.c (rlimit_resource_type, rlimit_resource_value): diff --git a/sprintf.c b/sprintf.c index 3d2d6db4b6..c4f304fafc 100644 --- a/sprintf.c +++ b/sprintf.c @@ -602,8 +602,8 @@ rb_str_format(int argc, const VALUE *argv, VALUE fmt) #endif len = (int)(p - start + 1); /* including parenthesis */ if (sym != Qnil) { - rb_enc_raise(enc, rb_eArgError, "named%.*s after <%s>", - len, start, RSTRING_PTR(rb_sym2str(sym))); + rb_enc_raise(enc, rb_eArgError, "named%.*s after <%"PRIsVALUE">", + len, start, rb_sym2str(sym)); } CHECKNAMEARG(start, len, enc); get_hash(&hash, argc, argv);