summaryrefslogtreecommitdiffstats
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
commita25bb1031219a08545203cc37f1e747a4865e8e4 (patch)
treea8e99598d6b241ae285ed8a2af9cfd844c1674f0 /string.c
parent02b6cfc9559522ab7227927b1e4977d2af993597 (diff)
downloadruby-a25bb1031219a08545203cc37f1e747a4865e8e4.tar.gz
ruby-a25bb1031219a08545203cc37f1e747a4865e8e4.tar.xz
ruby-a25bb1031219a08545203cc37f1e747a4865e8e4.zip
* string.c, parse.y, re.c: use rb_ascii8bit_encoding.
git-svn-id: http://svn.ruby-lang.org/repos/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 3c4e2fc98..29473251a 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);