File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments