Skip to content

Commit c870d26

Browse files
committed
Avoid matching exception message with format info
This will avoid tests from failing because of format changes like ruby/ruby#4857
1 parent 0c05791 commit c870d26

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

test/console/debugger_local_test.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def test_raised_is_accessible_from_repl
3434
type "catch Exception"
3535
type "c"
3636
type "_raised"
37-
assert_line_text(/#<NameError: undefined local variable or method `foo' for main:Object/)
37+
assert_line_text(/undefined local variable or method `foo' for main:Object/)
3838
type "c"
3939
end
4040
end
@@ -43,7 +43,7 @@ def test_raised_is_accessible_from_command
4343
debug_code(program) do
4444
type "catch Exception pre: p _raised"
4545
type "c"
46-
assert_line_text(/#<NameError: undefined local variable or method `foo' for main:Object/)
46+
assert_line_text(/undefined local variable or method `foo' for main:Object/)
4747
type "c"
4848
end
4949
end
@@ -96,7 +96,7 @@ def test_raised_doesnt_leak_to_program_binding
9696

9797
# stops for NoMethodError because _raised is not defiend in the program
9898
type "_raised"
99-
assert_line_text(/NameError: undefined local variable or method `_raised' for main:Object/)
99+
assert_line_text(/undefined local variable or method `_raised' for main:Object/)
100100
type "c"
101101
end
102102
end
@@ -155,7 +155,7 @@ def test_raised_doesnt_leak_to_program_binding
155155
type "c"
156156
# stops for NoMethodError because _return is not defiend in the program
157157
type "_raised"
158-
assert_line_text(/NameError: undefined local variable or method `_return' for main:Object/)
158+
assert_line_text(/undefined local variable or method `_return' for main:Object/)
159159
type "c"
160160
end
161161
end

0 commit comments

Comments
 (0)