aboutsummaryrefslogtreecommitdiffstats
path: root/test/ripper/test_parser_events.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ripper/test_parser_events.rb')
-rw-r--r--test/ripper/test_parser_events.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/ripper/test_parser_events.rb b/test/ripper/test_parser_events.rb
index c07fc4a01e..527c29023f 100644
--- a/test/ripper/test_parser_events.rb
+++ b/test/ripper/test_parser_events.rb
@@ -154,7 +154,7 @@ class TestRipper::ParserEvents < Test::Unit::TestCase
def test_operator_ambiguous
thru_operator_ambiguous = false
- parse('a=1; a //', :on_operator_ambiguous) {thru_operator_ambiguous = true}
+ parse('a=1; a %[]', :on_operator_ambiguous) {thru_operator_ambiguous = true}
assert_equal true, thru_operator_ambiguous
end
@@ -1088,4 +1088,12 @@ class TestRipper::ParserEvents < Test::Unit::TestCase
["[fcall(proc,[],&block([],[void()]))]"], [], '[ruby-dev:39423]')
end
end
+
+ def test_unterminated_regexp
+ assert_normal_exit(<<"SRC")
+$:.unshift(File.dirname(#{File.expand_path(__FILE__).dump}))
+require 'dummyparser'
+DummyParser.new('/').parse.to_s
+SRC
+ end
end if ripper_test