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): allows non-ascii names and

get rid of reserved word IDs.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2007-12-22 05:30:37 +00:00
parent 34ff55e82a
commit e11ed98f88
2 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,8 @@
Sat Dec 22 14:30:34 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
* parse.y (reg_named_capture_assign_iter): allows non-ascii names and
get rid of reserved word IDs.
Sat Dec 22 14:18:45 2007 Koichi Sasada <ko1@atdot.net> Sat Dec 22 14:18:45 2007 Koichi Sasada <ko1@atdot.net>
* test/ruby/test_float.rb, test_sprintf.rb: fix test place. * test/ruby/test_float.rb, test_sprintf.rb: fix test place.

View file

@ -8516,8 +8516,8 @@ reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end,
arg->fail_block = NEW_BEGIN(0); arg->fail_block = NEW_BEGIN(0);
} }
if (!(len && rb_enc_islower(*name, enc) && rb_enc_symname2_p(s, len, enc)) if (!len || (*name != '_' && ISASCII(*name) && !rb_enc_islower(*name, enc)) ||
|| rb_reserved_word(name, len)) { rb_reserved_word(s, len) || !rb_enc_symname2_p(s, len, enc)) {
return ST_CONTINUE; return ST_CONTINUE;
} }
var = rb_intern3(s, len, enc); var = rb_intern3(s, len, enc);