From 1d420d7c380a0ef4c57b4df8c9e400e2e8bd352d Mon Sep 17 00:00:00 2001 From: matz Date: Sat, 22 Dec 2007 01:36:35 +0000 Subject: [PATCH] * 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 --- ChangeLog | 3 +++ parse.y | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 36282abbae..4b23a9d280 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,9 @@ Sat Dec 22 10:25:44 2007 Yukihiro Matsumoto not be reserved word. a patch from Keita Yamaguchi 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 * eval.c (rb_f_method_name): now __method__ and __callee__ are diff --git a/parse.y b/parse.y index f63ff3667a..4a81ae7af0 100644 --- a/parse.y +++ b/parse.y @@ -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);