Skip to content

Commit

Permalink
Support Ruby 3.4's new error message format
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Feb 19, 2024
1 parent fa52fcd commit 68b848a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions test/console/debugger_local_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def test_raised_is_accessible_from_repl
type "catch Exception"
type "c"
type "_raised"
assert_line_text(/undefined local variable or method `foo' for main/)
assert_line_text(/undefined local variable or method [`']foo' for main/)
type "c"
end
end
Expand All @@ -43,7 +43,7 @@ def test_raised_is_accessible_from_command
debug_code(program) do
type "catch Exception pre: p _raised"
type "c"
assert_line_text(/undefined local variable or method `foo' for main/)
assert_line_text(/undefined local variable or method [`']foo' for main/)
type "c"
end
end
Expand Down Expand Up @@ -96,7 +96,7 @@ def test_raised_doesnt_leak_to_program_binding

# stops for NoMethodError because _raised is not defined in the program
type "_raised"
assert_line_text(/undefined local variable or method `_raised' for main/)
assert_line_text(/undefined local variable or method [`']_raised' for main/)
type "c"
end
end
Expand Down Expand Up @@ -155,7 +155,7 @@ def test_raised_doesnt_leak_to_program_binding
type "c"
# stops for NoMethodError because _return is not defined in the program
type "_raised"
assert_line_text(/undefined local variable or method `_return' for main/)
assert_line_text(/undefined local variable or method [`']_return' for main/)
type "c"
end
end
Expand Down
2 changes: 1 addition & 1 deletion test/console/info_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def test_info_constant_with_expression_errors

type "info constants foo"
assert_line_text([
/eval error: undefined local variable or method `foo' for main/,
/eval error: undefined local variable or method [`']foo' for main/,
])

type "c"
Expand Down

0 comments on commit 68b848a

Please sign in to comment.