mirror of
https://github.com/pry/pry-rails.git
synced 2022-11-09 12:36:03 -05:00
set Rails::Console::IRB instead of ::IRB
This commit is contained in:
parent
86beea6fdb
commit
363c6d65e8
1 changed files with 8 additions and 9 deletions
|
@ -6,19 +6,18 @@ module PryRails
|
|||
silence_warnings do
|
||||
begin
|
||||
require 'pry'
|
||||
::IRB = Pry
|
||||
unless defined?(IRB::ExtendCommandBundle)
|
||||
IRB::ExtendCommandBundle = Module.new
|
||||
Rails::Console::IRB = Pry
|
||||
unless defined?(Pry::ExtendCommandBundle)
|
||||
Pry::ExtendCommandBundle = Module.new
|
||||
end
|
||||
if ::Rails::VERSION::MINOR >= 2
|
||||
require "rails/console/app"
|
||||
require "rails/console/helpers"
|
||||
TOPLEVEL_BINDING.eval('self').extend Rails::ConsoleMethods
|
||||
end
|
||||
if ::Rails::VERSION::MINOR >= 2
|
||||
require "rails/console/app"
|
||||
require "rails/console/helpers"
|
||||
TOPLEVEL_BINDING.eval('self').extend Rails::ConsoleMethods
|
||||
end
|
||||
rescue LoadError
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue