mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/readline-ext] Use require check instead of DONT_RUN_RELINE_TEST env
https://github.com/ruby/readline-ext/commit/1df99d1481
This commit is contained in:
parent
a629f147cd
commit
fd6746c7a6
1 changed files with 3 additions and 1 deletions
|
@ -9,8 +9,10 @@ def use_ext_readline # Use ext/readline as Readline
|
|||
Object.const_set(:Readline, ReadlineSo)
|
||||
end
|
||||
|
||||
unless ENV['DONT_RUN_RELINE_TEST']
|
||||
begin
|
||||
require "reline"
|
||||
rescue LoadError
|
||||
else
|
||||
def use_lib_reline # Use lib/reline as Readline
|
||||
Reline.send(:remove_const, 'IOGate') if Reline.const_defined?('IOGate')
|
||||
Reline.const_set('IOGate', Reline::GeneralIO)
|
||||
|
|
Loading…
Add table
Reference in a new issue