summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-24 23:50:49 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-24 23:50:49 +0000
commit73fb923cb3489e8f6505493282f025c751f5fcd4 (patch)
tree1bd56877f0579531c7572745f4f738c637c042be
parent7ea675732ac1dac72f07756498706678d8725719 (diff)
scoped constant op-assignment
* test/ripper/test_parser_events.rb (test_opassign_error): allow scoped constant op-assignment. [ruby-core:40154] [Bug #5449] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--test/ripper/test_parser_events.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/ripper/test_parser_events.rb b/test/ripper/test_parser_events.rb
index 3c2b000..2bb2c08 100644
--- a/test/ripper/test_parser_events.rb
+++ b/test/ripper/test_parser_events.rb
@@ -355,14 +355,14 @@ class TestRipper::ParserEvents < Test::Unit::TestCase
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::Unit::TestCase
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
}