summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/irb/debug.rb7
-rw-r--r--lib/irb/debug/ui.rb5
2 files changed, 4 insertions, 8 deletions
diff --git a/lib/irb/debug.rb b/lib/irb/debug.rb
index f819f850b1..e522d39300 100644
--- a/lib/irb/debug.rb
+++ b/lib/irb/debug.rb
@@ -32,17 +32,14 @@ module IRB
end
DEBUGGER__::CONFIG.set_config
configure_irb_for_debugger(irb)
- thread = Thread.current
- DEBUGGER__.initialize_session{ IRB::Debug::UI.new(thread, irb) }
+ DEBUGGER__.initialize_session{ IRB::Debug::UI.new(irb) }
end
# When debug session was previously started but not by IRB
if defined?(DEBUGGER__::SESSION) && !irb.context.with_debugger
configure_irb_for_debugger(irb)
- thread = Thread.current
-
- DEBUGGER__::SESSION.reset_ui(IRB::Debug::UI.new(thread, irb))
+ DEBUGGER__::SESSION.reset_ui(IRB::Debug::UI.new(irb))
end
# Apply patches to debug gem so it skips IRB frames
diff --git a/lib/irb/debug/ui.rb b/lib/irb/debug/ui.rb
index a4ca4fdf0f..307097b8c9 100644
--- a/lib/irb/debug/ui.rb
+++ b/lib/irb/debug/ui.rb
@@ -4,8 +4,7 @@ require 'debug/console'
module IRB
module Debug
class UI < DEBUGGER__::UI_Base
- def initialize(thread, irb)
- @thread = thread
+ def initialize(irb)
@irb = irb
end
@@ -56,7 +55,7 @@ module IRB
def readline _
setup_interrupt do
- tc = DEBUGGER__::SESSION.get_thread_client(@thread)
+ tc = DEBUGGER__::SESSION.instance_variable_get(:@tc)
cmd = @irb.debug_readline(tc.current_frame.binding || TOPLEVEL_BINDING)
case cmd