summaryrefslogtreecommitdiff
path: root/sprintf.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-08-19 23:53:33 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-08-20 10:06:40 +0900
commit1a2f99275be28fb0e8ff4cfc0165966e99898d70 (patch)
treebf85a10d7f0f0398e7e8d9785acbc3c0249bab82 /sprintf.c
parent43e8d9a0509e1961c406fedb2c168a6ec2359fdc (diff)
[Bug #18958] format string must be ASCII compatible
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/6260
Diffstat (limited to 'sprintf.c')
-rw-r--r--sprintf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sprintf.c b/sprintf.c
index f7ebe82e2c..22323265b3 100644
--- a/sprintf.c
+++ b/sprintf.c
@@ -250,6 +250,7 @@ rb_str_format(int argc, const VALUE *argv, VALUE fmt)
--argv;
StringValue(fmt);
enc = rb_enc_get(fmt);
+ rb_must_asciicompat(fmt);
orig = fmt;
fmt = rb_str_tmp_frozen_acquire(fmt);
p = RSTRING_PTR(fmt);