Skip to content

Commit 442964a

Browse files
committed
Require rbs outside of thread to avoid deadlock
Using irb's debug command, debug will stop all threads. When thread running require is stopped, all require will be blocked forever.
1 parent f906170 commit 442964a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/repl_type_completor/types.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# frozen_string_literal: true
22

3+
require 'rbs'
4+
require 'rbs/cli'
35
require_relative 'methods'
46

57
module ReplTypeCompletor
@@ -22,8 +24,6 @@ def self.preload_rbs_builder
2224

2325
def self.load_rbs_builder
2426
@load_started = true
25-
require 'rbs'
26-
require 'rbs/cli'
2727
loader = RBS::CLI::LibraryOptions.new.loader
2828
loader.add path: Pathname('sig')
2929
@rbs_builder = RBS::DefinitionBuilder.new env: RBS::Environment.from_loader(loader).resolve_type_names

0 commit comments

Comments
 (0)