summaryrefslogtreecommitdiff
path: root/parse.y
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 /parse.y
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 'parse.y')
-rw-r--r--parse.y9
1 files changed, 7 insertions, 2 deletions
diff --git a/parse.y b/parse.y
index 121029d19d..26283aa6e5 100644
--- a/parse.y
+++ b/parse.y
@@ -5598,8 +5598,13 @@ parser_regx_options(struct parser_params *parser)
options |= RE_OPTION_ONCE;
}
else if (rb_char_to_option_kcode(c, &opt, &kc)) {
- kopt = opt;
- if (kc >= 0) kcode = c;
+ if (kc >= 0) {
+ if (kc != rb_ascii8bit_encindex()) kcode = c;
+ kopt = opt;
+ }
+ else {
+ options |= opt;
+ }
}
else {
tokadd(c);