mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Remove test_mode in lib/reline
.
This commit is contained in:
parent
9c0cd6a09e
commit
f60e5a1f99
2 changed files with 12 additions and 7 deletions
|
@ -179,13 +179,6 @@ module Reline
|
|||
@@line_editor&.delete_text(start, length)
|
||||
end
|
||||
|
||||
private_class_method def self.test_mode
|
||||
remove_const('IOGate') if const_defined?('IOGate')
|
||||
const_set('IOGate', Reline::GeneralIO)
|
||||
@@config.instance_variable_set(:@test_mode, true)
|
||||
@@config.reset
|
||||
end
|
||||
|
||||
def self.input=(val)
|
||||
raise TypeError unless val.respond_to?(:getc) or val.nil?
|
||||
if val.respond_to?(:getc)
|
||||
|
|
|
@ -1,7 +1,19 @@
|
|||
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
|
||||
require 'reline'
|
||||
require 'reline2'
|
||||
require 'test/unit'
|
||||
|
||||
module Reline
|
||||
class <<self
|
||||
def test_mode
|
||||
remove_const('IOGate') if const_defined?('IOGate')
|
||||
const_set('IOGate', Reline::GeneralIO)
|
||||
@@config.instance_variable_set(:@test_mode, true)
|
||||
@@config.reset
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
RELINE_TEST_ENCODING ||=
|
||||
if ENV['RELINE_TEST_ENCODING']
|
||||
Encoding.find(ENV['RELINE_TEST_ENCODING'])
|
||||
|
|
Loading…
Reference in a new issue