summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-22 20:59:30 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-22 20:59:30 +0000
commit3b3500c688a5cb5b9bac238d117bf23d5dc3b5f8 (patch)
treee6609720ffc88b1c2988cc547a8d3579378b4c22
parent89df822bc493f9c3b50747f2a583fbbd67aced2d (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--ChangeLog10
-rw-r--r--parse.y2
-rw-r--r--test/ruby/test_syntax.rb6
-rw-r--r--version.h2
4 files changed, 18 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 2b08997022..c06e4c9945 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/parse.y b/parse.y
index 6fb911b4b0..e1acdcddf4 100644
--- a/parse.y
+++ b/parse.y
@@ -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 }
diff --git a/version.h b/version.h
index 46e4387488..5a24e973f4 100644
--- a/version.h
+++ b/version.h
@@ -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