summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-11-22 12:30:58 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-11-22 12:30:58 +0000
commit94e6c0c233bd386e09e5700d947d4f5e4fca3914 (patch)
tree910643ee5b50e51c5d18cc9b61da9681decfe8ef /string.c
parent5d8a64b1afe08a0bf6d19b702453e0be4a58e5c7 (diff)
* string.c (rb_str_inspect): fix for ascii-compatible external
encoding and different encoding string. [ruby-core:33283] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/string.c b/string.c
index 307056cee7..7c5ddbdbd4 100644
--- a/string.c
+++ b/string.c
@@ -4238,7 +4238,7 @@ rb_str_inspect(VALUE str)
(cc == '$' || cc == '@' || cc == '{')))) {
if (p - n > prev) str_buf_cat(result, prev, p - n - prev);
str_buf_cat2(result, "\\");
- if (enc == resenc) {
+ if (asciicompat || enc == resenc) {
prev = p - n;
continue;
}