Skip to content

Commit dfe0795

Browse files
st0012ko1
authored andcommitted
Fix CheckBreakpoint#to_s
1 parent 5a76578 commit dfe0795

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

lib/debug/breakpoint.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,8 @@ def setup
333333
end
334334

335335
def to_s
336-
s = "#{generate_label("Check")} #{@cond}"
337-
s << " pre: #{@command[1]}" if defined?(@command) && @command && @command[1]
338-
s << " do: #{@command[2]}" if defined?(@command) && @command && @command[2]
336+
s = "#{generate_label("Check")}"
337+
s += super
339338
s
340339
end
341340
end

test/debug/break_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ def test_break_command_executes_do_option_and_continues_with_method_bp
464464
def test_break_command_executes_do_option_and_continues_with_check_bp
465465
debug_code(program) do
466466
type 'break if: s.is_a?(String) do: p "foobar"'
467-
assert_line_text(/BP - Check s\.is_a\?\(String\) do: p "foobar"/)
467+
assert_line_text(/BP - Check if: s\.is_a\?\(String\) do: p "foobar"/)
468468
type 'break 9'
469469
type 'c'
470470
assert_line_text(/foobar/)
@@ -654,7 +654,7 @@ def program
654654
def test_conditional_breakpoint_stops_if_condition_is_true
655655
debug_code program do
656656
type 'break if: a == 4'
657-
assert_line_text(/#0 BP - Check a == 4/)
657+
assert_line_text(/#0 BP - Check if: a == 4/)
658658
type 'c'
659659
assert_line_num 4
660660
type 'c'

0 commit comments

Comments
 (0)