diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-02-08 08:58:41 +0900 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-02-08 08:58:41 +0900 |
| commit | 7eebbce42ff62dc8e799d969194c9db5cc636a82 (patch) | |
| tree | e0996827c67b6689b825c18446eda4914f8887de | |
| parent | 794de3317aa2f2adb9c84900e470f140e581092c (diff) | |
| parent | 46e4e342f4a1bf216c027838e343919556703547 (diff) | |
| download | mruby-7eebbce42ff62dc8e799d969194c9db5cc636a82.tar.gz mruby-7eebbce42ff62dc8e799d969194c9db5cc636a82.zip | |
Merge pull request #3437 from eboda/master
Fix interpolation escaping in String.inspect
| -rw-r--r-- | src/string.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/string.c b/src/string.c index 7a75bb63e..c370e0723 100644 --- a/src/string.c +++ b/src/string.c @@ -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; |
