Skip to content

Commit 27de609

Browse files
st0012ko1
authored andcommitted
Rename Check bp's ivar name to match other bps'
1 parent 8747603 commit 27de609

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

lib/debug/breakpoint.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -317,10 +317,10 @@ def description
317317
end
318318

319319
class CheckBreakpoint < Breakpoint
320-
def initialize expr, path, command
321-
@expr = expr.freeze
320+
def initialize cond:, command: nil, path: nil
321+
@cond = cond
322322
@command = command
323-
@key = [:check, @expr].freeze
323+
@key = [:check, @cond].freeze
324324
@path = path
325325

326326
super()
@@ -332,14 +332,14 @@ def setup
332332
next if ThreadClient.current.management?
333333
next if skip_path?(tp.path)
334334

335-
if safe_eval tp.binding, @expr
335+
if safe_eval tp.binding, @cond
336336
suspend
337337
end
338338
}
339339
end
340340

341341
def to_s
342-
s = "#{generate_label("Check")} #{@expr}"
342+
s = "#{generate_label("Check")} #{@cond}"
343343
s << " pre: #{@command[1]}" if defined?(@command) && @command && @command[1]
344344
s << " do: #{@command[2]}" if defined?(@command) && @command && @command[2]
345345
s

lib/debug/session.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1356,8 +1356,8 @@ def add_catch_breakpoint pat
13561356
add_bp bp
13571357
end
13581358

1359-
def add_check_breakpoint expr, path, command
1360-
bp = CheckBreakpoint.new(expr, path, command)
1359+
def add_check_breakpoint cond, path, command
1360+
bp = CheckBreakpoint.new(cond: cond, path: path, command: command)
13611361
add_bp bp
13621362
end
13631363

0 commit comments

Comments
 (0)