summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-10 17:07:38 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-10 17:07:38 +0000
commite13ca981984c161ccf93eca0273d732be20d815a (patch)
tree4e32ca4e368e6d158e8dad683511ece4f486d553 /re.c
parent9e77c428ede98bd74f3dcefc96ae383398ba3645 (diff)
* parse.y (rb_char_to_option_kcode): ASCII-8BIT should also delay.
* re.c (parser_regx_options): return rb_ascii8bit_encindex on ASCII-8BIT. [ruby-dev:39300] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 're.c')
-rw-r--r--re.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/re.c b/re.c
index 2d7ea2c..e22c8c0 100644
--- a/re.c
+++ b/re.c
@@ -287,7 +287,7 @@ rb_char_to_option_kcode(int c, int *option, int *kcode)
switch (c) {
case 'n':
- *kcode = -1;
+ *kcode = rb_ascii8bit_encindex();
return (*option = ARG_ENCODING_NONE);
case 'e':
*kcode = rb_enc_find_index("EUC-JP");
@@ -296,7 +296,7 @@ rb_char_to_option_kcode(int c, int *option, int *kcode)
*kcode = rb_enc_find_index("Windows-31J");
break;
case 'u':
- *kcode = rb_enc_find_index("UTF-8");
+ *kcode = rb_utf8_encindex();
break;
default:
*kcode = -1;