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 authored and ko1 committed Feb 20, 2024
1 parent fa52fcd commit cfa0da2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 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
4 changes: 2 additions & 2 deletions test/console/info_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def test_prints_current_thread
type 'b 7'
type 'c'
type 'info threads'
assert_line_text(/#0 \(sleep\)@.*:7:in `<main>'/)
assert_line_text(/#0 \(sleep\)@.*:7:in [`']<main>'/)
type 'kill!'
end
end
Expand Down 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 cfa0da2

Please sign in to comment.