зеркало из https://github.com/github/ruby.git
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
This commit is contained in:
Родитель
481a6476ce
Коммит
ba6e61d6f5
|
@ -1,3 +1,8 @@
|
|||
Wed Sep 9 17:17:31 2009 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* re.c (parser_regx_options): only one kcode should effect
|
||||
options [ruby-core:25411]
|
||||
|
||||
Wed Sep 9 15:46:28 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* load.c (rb_feature_provided): fixed for autoloading extension
|
||||
|
|
4
parse.y
4
parse.y
|
@ -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();
|
||||
|
|
Загрузка…
Ссылка в новой задаче