summaryrefslogtreecommitdiff
path: root/test/ruby/test_keyword.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-25 14:57:18 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-25 14:57:18 +0000
commitdcd1e5e5c298b35899c962985b4d195781c6397d (patch)
treef0ed30ddbba72cca48a4e9c7f2d0c561b4f20d6c /test/ruby/test_keyword.rb
parent6df5f314ac7809e2aedc22a961cf31c4e3f21d42 (diff)
parse.y: required kwarg without parentheses
* parse.y (parser_yylex): only a newline after label should be significant. [ruby-core:61658] [Bug #9669] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_keyword.rb')
-rw-r--r--test/ruby/test_keyword.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_keyword.rb b/test/ruby/test_keyword.rb
index 75b8f58a98..31830dfb2f 100644
--- a/test/ruby/test_keyword.rb
+++ b/test/ruby/test_keyword.rb
@@ -335,6 +335,15 @@ class TestKeywordArguments < Test::Unit::TestCase
end;
end
assert_equal(42, bug9669.foo(a: 42))
+ assert_nothing_raised(SyntaxError, bug9669) do
+ eval(<<-'end;', nil, __FILE__, __LINE__)
+ o = {
+ a:
+ 1
+ }
+ end;
+ end
+ assert_equal({a: 1}, o, bug9669)
end
def test_block_required_keyword