Activate irb if irb is bundled gems

This commit is contained in:
Hiroshi SHIBATA 2024-09-17 12:36:19 +09:00
parent 76d927f88f
commit bb7025b7e8
No known key found for this signature in database
GPG Key ID: F9CF13417264FAC2

View File

@ -1,8 +1,12 @@
class Binding
# :nodoc:
def irb
force_activate 'irb'
require 'irb'
begin
require 'irb'
rescue LoadError, Gem::LoadError
force_activate 'irb'
retry
end
irb
end
@ -10,8 +14,6 @@ class Binding
alias irb irb # :nodoc:
private def force_activate(gem)
return if !defined?(Bundler) || Gem.loaded_specs.key?(gem)
Bundler.reset!
builder = Bundler::Dsl.new