Skip to content

Commit 3cb98ad

Browse files
committed
Fix CheckBreakpoint#to_s
1 parent 3574b72 commit 3cb98ad

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
@@ -329,9 +329,8 @@ def setup
329329
end
330330

331331
def to_s
332-
s = "#{generate_label("Check")} #{@cond}"
333-
s << " pre: #{@command[1]}" if defined?(@command) && @command && @command[1]
334-
s << " do: #{@command[2]}" if defined?(@command) && @command && @command[2]
332+
s = "#{generate_label("Check")}"
333+
s += super
335334
s
336335
end
337336
end

test/debug/break_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ def test_break_command_executes_do_option_and_continues_with_method_bp
443443
def test_break_command_executes_do_option_and_continues_with_check_bp
444444
debug_code(program) do
445445
type 'break if: s.is_a?(String) do: p "foobar"'
446-
assert_line_text(/BP - Check s\.is_a\?\(String\) do: p "foobar"/)
446+
assert_line_text(/BP - Check if: s\.is_a\?\(String\) do: p "foobar"/)
447447
type 'break 9'
448448
type 'c'
449449
assert_line_text(/foobar/)
@@ -633,7 +633,7 @@ def program
633633
def test_conditional_breakpoint_stops_if_condition_is_true
634634
debug_code program do
635635
type 'break if: a == 4'
636-
assert_line_text(/#0 BP - Check a == 4/)
636+
assert_line_text(/#0 BP - Check if: a == 4/)
637637
type 'c'
638638
assert_line_num 4
639639
type 'c'

0 commit comments

Comments
 (0)