Skip to content
Permalink
Browse files
Fix interpolation escaping in String.inspect
  • Loading branch information
eboda committed Feb 7, 2017
1 parent 794de33 commit 46e4e342f4a1bf216c027838e343919556703547
Showing 1 changed file with 1 addition and 1 deletion.
@@ -2644,7 +2644,7 @@ mrb_str_inspect(mrb_state *mrb, mrb_value str)
}
#endif
c = *p;
if (c == '"'|| c == '\\' || (c == '#' && IS_EVSTR(p, pend))) {
if (c == '"'|| c == '\\' || (c == '#' && IS_EVSTR(p+1, pend))) {
buf[0] = '\\'; buf[1] = c;
mrb_str_cat(mrb, result, buf, 2);
continue;

0 comments on commit 46e4e34

Please sign in to comment.