diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-09-09 08:19:06 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-09-09 08:19:06 +0000 |
commit | ba6e61d6f568401c8527861f560b42954c7fa05a (patch) | |
tree | 0055b931064fc307dc4f168d1919bc8db0d9c121 /parse.y | |
parent | 481a6476ce0b2669f98e0bcdaa9e210c411b166b (diff) | |
download | ruby-ba6e61d6f568401c8527861f560b42954c7fa05a.tar.gz |
Only 1 kcode effects options [ruby-core:25411]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -5588,6 +5588,7 @@ static int parser_regx_options(struct parser_params *parser) { int kcode = 0; + int kopt = 0; int options = 0; int c, opt, kc; @@ -5597,13 +5598,14 @@ parser_regx_options(struct parser_params *parser) options |= RE_OPTION_ONCE; } else if (rb_char_to_option_kcode(c, &opt, &kc)) { - options |= opt; + kopt = opt; if (kc >= 0) kcode = c; } else { tokadd(c); } } + options |= kopt; pushback(c); if (toklen()) { tokfix(); |