Skip to content

Commit 9960792

Browse files
committed
Move skipping logic out of Config class
1 parent b5ce120 commit 9960792

File tree

5 files changed

+15
-13
lines changed

5 files changed

+15
-13
lines changed

lib/debug/config.rb

-10
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ def self.config
6363
end
6464

6565
def initialize argv
66-
@skip_all = false
67-
6866
if self.class.config
6967
raise 'Can not make multiple configurations in one process'
7068
end
@@ -94,14 +92,6 @@ def []=(key, val)
9492
set_config(key => val)
9593
end
9694

97-
def skip_all
98-
@skip_all = true
99-
end
100-
101-
def skip?
102-
@skip_all
103-
end
104-
10595
def set_config(**kw)
10696
conf = config.dup
10797
kw.each{|k, v|

lib/debug/server_cdp.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def run_new_chrome
9494
stderr.close
9595

9696
at_exit{
97-
CONFIG.skip_all
97+
DEBUGGER__.skip_all
9898
FileUtils.rm_rf dir
9999
}
100100

lib/debug/server_dap.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def self.setup debug_port
1818
end
1919

2020
at_exit do
21-
CONFIG.skip_all
21+
DEBUGGER__.skip_all
2222
FileUtils.rm_rf dir if tempdir
2323
end
2424

lib/debug/session.rb

+12
Original file line numberDiff line numberDiff line change
@@ -2126,6 +2126,18 @@ class << self
21262126
end
21272127
end
21282128

2129+
# Exiting control
2130+
2131+
class << self
2132+
def skip_all
2133+
@skip_all = true
2134+
end
2135+
2136+
def skip?
2137+
@skip_all
2138+
end
2139+
end
2140+
21292141
def self.load_rc
21302142
[[File.expand_path('~/.rdbgrc'), true],
21312143
[File.expand_path('~/.rdbgrc.rb'), true],

lib/debug/thread_client.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module DEBUGGER__
1818
module SkipPathHelper
1919
def skip_path?(path)
2020
!path ||
21-
CONFIG.skip? ||
21+
DEBUGGER__.skip? ||
2222
ThreadClient.current.management? ||
2323
skip_internal_path?(path) ||
2424
skip_config_skip_path?(path)

0 commit comments

Comments
 (0)