mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Fix use_lib_reline for test/readline
This commit is contained in:
parent
344f507e4e
commit
3a4a58e2cc
1 changed files with 4 additions and 1 deletions
|
@ -11,7 +11,10 @@ def use_ext_readline # Use ext/readline as Readline
|
|||
end
|
||||
|
||||
def use_lib_reline # Use lib/reline as Readline
|
||||
Reline.send(:test_mode)
|
||||
Reline.send(:remove_const, 'IOGate') if Reline.const_defined?('IOGate')
|
||||
Reline.const_set('IOGate', Reline::GeneralIO)
|
||||
Reline.send(:core).config.instance_variable_set(:@test_mode, true)
|
||||
Reline.send(:core).config.reset
|
||||
Object.send(:remove_const, :Readline) if Object.const_defined?(:Readline)
|
||||
Object.const_set(:Readline, Reline)
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue