From 059cf260e72bace987bf4e1fc09733b576547c67 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 10 Aug 2017 00:50:45 +0000 Subject: compile.c: fix KW_SPLAT flag condition * compile.c (compile_array_keyword_arg): fix the condition of KW_SPLAT flag. splat is value node only without key node, simple assoc argument is not. [ruby-core:82291] [Bug #13793] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_keyword.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test') diff --git a/test/ruby/test_keyword.rb b/test/ruby/test_keyword.rb index b673cb7eec..e2bdc34731 100644 --- a/test/ruby/test_keyword.rb +++ b/test/ruby/test_keyword.rb @@ -516,6 +516,8 @@ class TestKeywordArguments < Test::Unit::TestCase o = {a: 42} assert_equal({a: 42}, m.f2(**o), '[ruby-core:82280] [Bug #13791]') + + assert_equal({a: 42}, m.f2("a".to_sym => 42), '[ruby-core:82291] [Bug #13793]') end def test_gced_object_in_stack -- cgit v1.2.3