summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-13 11:17:18 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-13 11:17:18 +0000
commit99ac392284108802b57722dcd7d0fb5e1942206f (patch)
tree90e004ab28a3301206e1e5a35f10d5668fb4d4d7 /test
parent5f0324e52ddb861eb760716abae63120c3ec5643 (diff)
* parse.y (parse_percent): Allow %-literals in labeled arg as
r51624 did for parentheses. Fixes [ruby-core:72084] [Bug #11812]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_syntax.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb
index 82af7817e7..2ed3859860 100644
--- a/test/ruby/test_syntax.rb
+++ b/test/ruby/test_syntax.rb
@@ -335,6 +335,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 }