We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0cab8a0 commit fe573fdCopy full SHA for fe573fd
lib/debug/thread_client.rb
@@ -5,6 +5,10 @@
5
6
require_relative 'color'
7
8
+class ::Thread
9
+ attr_accessor :debug_thread_client
10
+end
11
+
12
module DEBUGGER__
13
M_INSTANCE_VARIABLES = method(:instance_variables).unbind
14
M_INSTANCE_VARIABLE_GET = method(:instance_variable_get).unbind
@@ -48,12 +52,7 @@ def safe_global_variables
48
52
49
53
class ThreadClient
50
54
def self.current
51
- if thc = Thread.current[:DEBUGGER__ThreadClient]
- thc
- else
- thc = SESSION.get_thread_client
55
- Thread.current[:DEBUGGER__ThreadClient] = thc
56
- end
+ Thread.current.debug_thread_client ||= SESSION.get_thread_client
57
end
58
59
include Color
0 commit comments