summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
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 120b172d8b..8144b61fa5 100644
--- a/string.c
+++ b/string.c
@@ -4147,7 +4147,7 @@ str_upto_each(VALUE beg, VALUE end, int excl, int (*each)(VALUE, VALUE), VALUE a
}
else {
ID op = excl ? '<' : idLE;
- VALUE args[2], fmt = rb_obj_freeze(rb_usascii_str_new_cstr("%.*d"));
+ VALUE args[2], fmt = rb_fstring_cstr("%.*d");
args[0] = INT2FIX(width);
while (rb_funcall(b, op, 1, e)) {