Skip to content

Commit

Permalink
Fix changes in syntax error locations after Prism upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
vinistock committed Jan 2, 2025
1 parent 5170a26 commit 7e6210d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/rbi/parser_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,7 @@ def bar
"to close the `def` statement.",
e.message,
)
assert_equal("-:2:0", e.location.to_s)
assert_equal("-:1:7", e.location.to_s)

e = assert_raises(ParseError) do
Parser.parse_string(<<~RBI)
Expand Down Expand Up @@ -1097,7 +1097,7 @@ class Foo
"to close the `class` statement.",
e.message,
)
assert_equal("test_parse_real_file_with_error.rbi:2:0", e.location.to_s)
assert_equal("test_parse_real_file_with_error.rbi:1:9", e.location.to_s)

FileUtils.rm_rf(path)
end
Expand Down

0 comments on commit 7e6210d

Please sign in to comment.