From b0c03f63e5b3865684d8d37e8cac666ba7e0e3e0 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 20 Sep 2014 01:48:43 +0000 Subject: parse.y: quoted ID key * parse.y (assoc): allow quoted ID as a key of a hash literal. [ruby-core:34453] [Feature #4276] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ripper/test_parser_events.rb | 4 ++++ 1 file changed, 4 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 537d3fc406..1942157b89 100644 --- a/test/ripper/test_parser_events.rb +++ b/test/ripper/test_parser_events.rb @@ -548,6 +548,10 @@ class TestRipper::ParserEvents < Test::Unit::TestCase thru_dyna_symbol = false parse(':"#{foo}"', :on_dyna_symbol) {thru_dyna_symbol = true} assert_equal true, thru_dyna_symbol + + thru_dyna_symbol = false + parse('{"#{foo}": 1}', :on_dyna_symbol) {thru_dyna_symbol = true} + assert_equal true, thru_dyna_symbol end def test_else -- cgit v1.2.3