mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
escape non-ascii characters correctly in String#inspect
This commit is contained in:
+1
-1
@@ -2412,7 +2412,7 @@ mrb_str_inspect(mrb_state *mrb, mrb_value str)
|
||||
|
||||
p = RSTRING_PTR(str); pend = RSTRING_END(str);
|
||||
for (;p < pend; p++) {
|
||||
unsigned int c, cc;
|
||||
unsigned char c, cc;
|
||||
|
||||
c = *p;
|
||||
if (c == '"'|| c == '\\' || (c == '#' && IS_EVSTR(p, pend))) {
|
||||
|
||||
Reference in New Issue
Block a user