From 3380974143d3fdf1721d9e28d6b2d42036f03bd2 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 28 Apr 2012 21:12:05 +0000 Subject: * parse.y (assoc, parser_yylex): add syntax to splat keyword hash. [ruby-core:44591][Feature #6353] * compile.c (compile_array_): generate keyword splat insns. * vm.c (m_core_hash_merge_kwd): merge keyword hash into intermediate hash. leftward argument is prior currently. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ripper/test_parser_events.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/ripper/test_parser_events.rb') diff --git a/test/ripper/test_parser_events.rb b/test/ripper/test_parser_events.rb index af41d3e6a4..3b4785804d 100644 --- a/test/ripper/test_parser_events.rb +++ b/test/ripper/test_parser_events.rb @@ -146,6 +146,12 @@ class TestRipper::ParserEvents < Test::Unit::TestCase assert_equal true, thru_assoc_new end + def test_assoc_splat + thru_assoc_splat = false + parse('m(**h)', :on_assoc_splat) {thru_assoc_splat = true} + assert_equal true, thru_assoc_splat + end + def test_aref_field assert_equal '[assign(aref_field(vcall(a),[1]),2)]', parse('a[1]=2') end -- cgit v1.2.3