1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* parse.y (reg_named_capture_assign_iter): just ignore the

captures that do not have valid local variable name.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2007-12-22 01:36:35 +00:00
parent c375b2f420
commit 1d420d7c38
2 changed files with 3 additions and 2 deletions

View file

@ -8,6 +8,9 @@ Sat Dec 22 10:25:44 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
not be reserved word. a patch from Keita Yamaguchi
<keita.yamaguchi AT gmail.com> in [ruby-dev:32675].
* parse.y (reg_named_capture_assign_iter): just ignore the
captures that do not have valid local variable name.
Sat Dec 22 10:19:08 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
* eval.c (rb_f_method_name): now __method__ and __callee__ are

View file

@ -8518,8 +8518,6 @@ reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end,
if (!(len && rb_enc_islower(*name, enc) && rb_enc_symname2_p(s, len, enc))
|| rb_reserved_word(name, len)) {
compile_error(PARSER_ARG "named capture with a non local variable - %.*s",
len, name);
return ST_CONTINUE;
}
var = rb_intern3(s, len, enc);