File tree Expand file tree Collapse file tree 3 files changed +24
-5
lines changed
Expand file tree Collapse file tree 3 files changed +24
-5
lines changed Original file line number Diff line number Diff line change 1+ ## [ master] ( https://github.com/ruby-debug/ruby-debug-ide/compare/v0.6.0...master )
2+
3+ * let's use Debugger#remove_catchpoint and Debugger#clear_catchpoints if available
4+
15## [ 0.6.0] ( https://github.com/ruby-debug/ruby-debug-ide/compare/v0.5.0...0.6.0 )
26
37* "file-filter on|off" command added
Original file line number Diff line number Diff line change @@ -16,21 +16,20 @@ def execute
1616 elsif not @match [ 2 ]
1717 # One arg given.
1818 if 'off' == excn
19- Debugger . catchpoints . clear
19+ clear_catchpoints
2020 else
2121 Debugger . add_catchpoint ( excn )
2222 print_catchpoint_set ( excn )
2323 end
2424 elsif @match [ 2 ] != 'off'
2525 errmsg "Off expected. Got %s\n " , @match [ 2 ]
26- elsif Debugger . catchpoints . member? ( excn )
27- Debugger . catchpoints . delete ( excn )
26+ elsif remove_catchpoint ( excn )
2827 print_catchpoint_deleted ( excn )
2928 else
3029 errmsg "Catch for exception %s not found.\n " , excn
3130 end
3231 end
33-
32+
3433 class << self
3534 def help_command
3635 'catch'
@@ -45,5 +44,21 @@ def help(cmd)
4544 }
4645 end
4746 end
47+
48+ private
49+
50+ def clear_catchpoints
51+ if Debugger . respond_to? ( :clear_catchpoints )
52+ Debugger . clear_catchpoints
53+ else
54+ Debugger . catchpoints . clear
55+ end
56+ end
57+
58+ def remove_catchpoint ( excn )
59+ return Debugger . remove_catchpoint ( excn ) if Debugger . respond_to? ( :remove_catchpoint )
60+ return Debugger . catchpoints . delete ( excn ) if Debugger . catchpoints . member? ( excn )
61+ false
62+ end
4863 end
4964end
Original file line number Diff line number Diff line change 11module Debugger
2- IDE_VERSION = '0.6.0 '
2+ IDE_VERSION = '0.6.1.beta1 '
33end
You can’t perform that action at this time.
0 commit comments