ruby-changes:47992
From: nobu <ko1@a...>
Date: Tue, 3 Oct 2017 16:51:41 +0900 (JST)
Subject: [ruby-changes:47992] nobu:r60106 (trunk): test_parser_events.rb: backref_assign_error
nobu 2017-10-03 16:51:37 +0900 (Tue, 03 Oct 2017) New Revision: 60106 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60106 Log: test_parser_events.rb: backref_assign_error Modified files: trunk/test/ripper/test_parser_events.rb Index: test/ripper/test_parser_events.rb =================================================================== --- test/ripper/test_parser_events.rb (revision 60105) +++ test/ripper/test_parser_events.rb (revision 60106) @@ -199,11 +199,16 @@ class TestRipper::ParserEvents < Test::U https://github.com/ruby/ruby/blob/trunk/test/ripper/test_parser_events.rb#L199 def test_assign_error_backref thru_assign_error = false - parse('$` = 1', :on_assign_error) {thru_assign_error = true} + result = + parse('$` = 1', :on_assign_error) {thru_assign_error = true} assert_equal true, thru_assign_error + assert_equal '[assign(assign_error(var_field($`)),1)]', result + thru_assign_error = false - parse('$`, _ = 1', :on_assign_error) {thru_assign_error = true} + result = + parse('$`, _ = 1', :on_assign_error) {thru_assign_error = true} assert_equal true, thru_assign_error + assert_equal '[massign([assign_error(var_field($`)),_],1)]', result end def test_assign_error_const_qualified -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/