mirror of
https://github.com/ruby/ruby.git
synced 2025-08-25 22:14:37 +02:00
[ruby/reline] Reduce direct references to Reline::IOGate
(https://github.com/ruby/reline/pull/566) * Avoid referencing IOGate from IOGate classes The only time those classes being used is when themselves being the IOGate. So when referencing to IOGate, it's better to use `self` instead. * Avoid referencing to IOGate from LineEditor directly * Avoid referencing to IOGate from Core directly * Reference to Reline.core directly * Replace Reline::IOGate with Reline.core.io_gate
This commit is contained in:
parent
a642a94b68
commit
24d9e21f84
15 changed files with 60 additions and 52 deletions
|
@ -6,7 +6,7 @@ class Reline::LineEditor::StringProcessingTest < Reline::TestCase
|
|||
@prompt = '> '
|
||||
@config = Reline::Config.new
|
||||
Reline::HISTORY.instance_variable_set(:@config, @config)
|
||||
@encoding = Reline::IOGate.encoding
|
||||
@encoding = Reline.core.encoding
|
||||
@line_editor = Reline::LineEditor.new(@config, @encoding)
|
||||
@line_editor.reset(@prompt, encoding: @encoding)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue