aboutsummaryrefslogtreecommitdiffstats
path: root/string.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-28 09:03:09 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-28 09:03:09 +0000
commit3c6969ec114d544d4e84c242171c30c346ccf23a (patch)
treea8e99598d6b241ae285ed8a2af9cfd844c1674f0 /string.c
parent2f961c1f371e6dd0517a1ca4b9f245e2c2f1a90d (diff)
downloadruby-3c6969ec114d544d4e84c242171c30c346ccf23a.tar.gz
* string.c, parse.y, re.c: use rb_ascii8bit_encoding.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15292 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 3c4e2fc981..29473251a3 100644
--- a/string.c
+++ b/string.c
@@ -3477,7 +3477,7 @@ rb_str_dump(VALUE str)
*q++ = '"';
if (!rb_enc_asciicompat(enc0)) {
sprintf(q, ".force_encoding(\"%s\")", enc0->name);
- enc0 = rb_enc_from_index(0);
+ enc0 = rb_ascii8bit_encoding();
}
OBJ_INFECT(result, str);