summaryrefslogtreecommitdiffhomepage
path: root/src/sprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sprintf.c')
-rw-r--r--src/sprintf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sprintf.c b/src/sprintf.c
index 56141e482..86c3b66bc 100644
--- a/src/sprintf.c
+++ b/src/sprintf.c
@@ -613,7 +613,7 @@ retry:
(int)(p - start + 1), start, mrb_sym2name(mrb, id));
}
symname = mrb_str_new(mrb, start + 1, p - start - 1);
- id = mrb_intern(mrb, RSTRING_PTR(symname));
+ id = mrb_intern_str(mrb, symname);
nextvalue = GETNAMEARG(mrb_symbol_value(id), start, (int)(p - start + 1));
if (UNDEF_P(nextvalue)) {
mrb_raise(mrb, E_KEY_ERROR, "key%.*s not found", (int)(p - start + 1), start);