ruby-changes:26535
From: nobu <ko1@a...>
Date: Tue, 25 Dec 2012 08:51:02 +0900 (JST)
Subject: [ruby-changes:26535] nobu:r38586 (trunk): scoped constant op-assignment
nobu 2012-12-25 08:50:49 +0900 (Tue, 25 Dec 2012) New Revision: 38586 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=38586 Log: scoped constant op-assignment * test/ripper/test_parser_events.rb (test_opassign_error): allow scoped constant op-assignment. [ruby-core:40154] [Bug #5449] Modified files: trunk/test/ripper/test_parser_events.rb Index: test/ripper/test_parser_events.rb =================================================================== --- test/ripper/test_parser_events.rb (revision 38585) +++ test/ripper/test_parser_events.rb (revision 38586) @@ -355,14 +355,14 @@ class TestRipper::ParserEvents < Test::U https://github.com/ruby/ruby/blob/trunk/test/ripper/test_parser_events.rb#L355 def test_heredoc bug1921 = '[ruby-core:24855]' thru_heredoc_beg = false - tree = parse("<<EOS\nheredoc\nEOS\n", :on_heredoc_beg) {thru_heredoc_beg = true} + tree = parse("<""<EOS\nheredoc\nEOS\n", :on_heredoc_beg) {thru_heredoc_beg = true} assert_equal true, thru_heredoc_beg assert_match(/string_content\(\),heredoc\n/, tree, bug1921) heredoc = nil - parse("<<EOS\nheredoc1\nheredoc2\nEOS\n", :on_string_add) {|e, n, s| heredoc = s} + parse("<""<EOS\nheredoc1\nheredoc2\nEOS\n", :on_string_add) {|e, n, s| heredoc = s} assert_equal("heredoc1\nheredoc2\n", heredoc, bug1921) heredoc = nil - parse("<<-EOS\nheredoc1\nheredoc2\n\tEOS\n", :on_string_add) {|e, n, s| heredoc = s} + parse("<""<-EOS\nheredoc1\nheredoc2\n\tEOS\n", :on_string_add) {|e, n, s| heredoc = s} assert_equal("heredoc1\nheredoc2\n", heredoc, bug1921) end @@ -703,7 +703,7 @@ class TestRipper::ParserEvents < Test::U https://github.com/ruby/ruby/blob/trunk/test/ripper/test_parser_events.rb#L703 def test_opassign_error thru_opassign = [] - events = [:on_opassign, :on_assign_error] + events = [:on_opassign] parse('a::X ||= c 1', events) {|a,*b| thru_opassign << a } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/