diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-05-26 11:33:40 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-05-26 16:24:33 +0900 |
commit | 02b39daef834890981689f1f697c7c25cad55dd6 (patch) | |
tree | 638b2d98375489298bfb0cb11706438c9c073921 /test/ruby | |
parent | f20af9543f278ab602d001dace850dcf4411cfa6 (diff) | |
download | ruby-02b39daef834890981689f1f697c7c25cad55dd6.tar.gz |
Fix scanner event at invalid syntax
* parse.y (parser_yyerror, parser_compile_error): revert
r67224 (e5d10cda07b23682e5e4e64d1324e4d3247d4785) "Flush erred
token".
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_iseq.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/ruby/test_iseq.rb b/test/ruby/test_iseq.rb index f2d11cdb7e..dda70ac7dd 100644 --- a/test/ruby/test_iseq.rb +++ b/test/ruby/test_iseq.rb @@ -246,9 +246,12 @@ class TestISeq < Test::Unit::TestCase end end assert_equal([m1, e1.message], [m2, e2.message], feature11951) - e1, *, e2 = e1.message.lines - assert_send([e1, :start_with?, __FILE__]) - assert_send([e2, :start_with?, __FILE__]) + message = e1.message.each_line + message.with_index(1) do |line, i| + next if /^ / =~ line + assert_send([line, :start_with?, __FILE__], + proc {message.map {|l, j| (i == j ? ">" : " ") + l}.join("")}) + end end def test_compile_file_error |