Skip to content

Commit 46e4e34

Browse files
committed
Fix interpolation escaping in String.inspect
1 parent 794de33 commit 46e4e34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/string.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2644,7 +2644,7 @@ mrb_str_inspect(mrb_state *mrb, mrb_value str)
26442644
}
26452645
#endif
26462646
c = *p;
2647-
if (c == '"'|| c == '\\' || (c == '#' && IS_EVSTR(p, pend))) {
2647+
if (c == '"'|| c == '\\' || (c == '#' && IS_EVSTR(p+1, pend))) {
26482648
buf[0] = '\\'; buf[1] = c;
26492649
mrb_str_cat(mrb, result, buf, 2);
26502650
continue;

0 commit comments

Comments
 (0)