summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-15 01:35:56 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-15 01:35:56 +0000
commit17fb1248afd41c0da5c421c34d029695bb690069 (patch)
tree3dc4fe58a4c7a5fbc33b457a5460bec313d08eef /re.c
parent5b7bdd56ad54624de87b107eebe417b755bfc25c (diff)
* re.c (rb_reg_quote): set US-ACII for ASCII-only string.
[ruby-dev:33785] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 're.c')
-rw-r--r--re.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/re.c b/re.c
index cd93024302..4867104250 100644
--- a/re.c
+++ b/re.c
@@ -2540,7 +2540,7 @@ rb_reg_quote(VALUE str)
}
if (ascii_only && rb_enc_get_index(str) != 0) {
str = rb_str_new3(str);
- rb_enc_associate(str, rb_ascii8bit_encoding());
+ rb_enc_associate(str, rb_usascii_encoding());
}
return str;