summaryrefslogtreecommitdiff
path: root/test/ripper
diff options
context:
space:
mode:
Diffstat (limited to 'test/ripper')
-rw-r--r--test/ripper/test_parser_events.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/ripper/test_parser_events.rb b/test/ripper/test_parser_events.rb
index 7af2019a09..7eac20a3ec 100644
--- a/test/ripper/test_parser_events.rb
+++ b/test/ripper/test_parser_events.rb
@@ -173,8 +173,14 @@ 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}
+ token = syntax = nil
+ parse('a=1; a %[]', :on_operator_ambiguous) {|*a|
+ thru_operator_ambiguous = true
+ _, token, syntax = *a
+ }
assert_equal true, thru_operator_ambiguous
+ assert_equal :%, token
+ assert_equal "string literal", syntax
end
def test_array # array literal