diff options
author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-22 20:59:30 +0000 |
---|---|---|
committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-22 20:59:30 +0000 |
commit | 3b3500c688a5cb5b9bac238d117bf23d5dc3b5f8 (patch) | |
tree | e6609720ffc88b1c2988cc547a8d3579378b4c22 | |
parent | 89df822bc493f9c3b50747f2a583fbbd67aced2d (diff) |
merge revision(s) 53092,53093: [Backport #11812] [Backport #11833]
* parse.y (parse_percent): Allow %-literals in labeled arg as
r51624 did for parentheses.
Fixes [ruby-core:72084] [Bug #11812].
* test/ruby/test_syntax.rb: fix typo in test
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@53257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | parse.y | 2 | ||||
-rw-r--r-- | test/ruby/test_syntax.rb | 6 | ||||
-rw-r--r-- | version.h | 2 |
4 files changed, 18 insertions, 2 deletions
@@ -1,3 +1,13 @@ +Wed Dec 23 05:52:06 2015 Yuki Yugui Sonoda <yugui@yugui.jp> + + * test/ruby/test_syntax.rb: fix typo in test + +Wed Dec 23 05:52:06 2015 Yuki Yugui Sonoda <yugui@yugui.jp> + + * parse.y (parse_percent): Allow %-literals in labeled arg as + r51624 did for parentheses. + Fixes [ruby-core:72084] [Bug #11812]. + Mon Dec 21 05:05:54 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org> * cont.c: fix a double word typo. @@ -7485,7 +7485,7 @@ parse_percent(struct parser_params *parser, const int space_seen, const enum lex { register int c; - if (IS_lex_state(EXPR_BEG_ANY)) { + if (IS_BEG()) { int term; int paren; diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb index cc5ed5f35a..6ff7c2b387 100644 --- a/test/ruby/test_syntax.rb +++ b/test/ruby/test_syntax.rb @@ -326,6 +326,12 @@ WARN assert_valid_syntax("{foo: /=/}", bug11456) end + def test_percent_string_after_label + bug11812 = '[ruby-core:72084]' + assert_valid_syntax('{label:%w(*)}', bug11812) + assert_valid_syntax('{label: %w(*)}', bug11812) + end + def test_duplicated_arg assert_syntax_error("def foo(a, a) end", /duplicated argument name/) assert_nothing_raised { def foo(_, _) end } @@ -1,6 +1,6 @@ #define RUBY_VERSION "2.2.5" #define RUBY_RELEASE_DATE "2015-12-23" -#define RUBY_PATCHLEVEL 233 +#define RUBY_PATCHLEVEL 234 #define RUBY_RELEASE_YEAR 2015 #define RUBY_RELEASE_MONTH 12 |