1
0
Fork 0
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:
aycabta 2020-02-09 17:18:41 +09:00
parent a629f147cd
commit fd6746c7a6

View file

@ -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)