mirror of
https://github.com/ruby/ruby.git
synced 2025-08-25 22:14:37 +02:00
Introduce an abstracted structure about the encoding of Reline
The command prompt on Windows always uses Unicode to take input and print output but most Reline implementation depends on Encoding.default_external. This commit introduces an abstracted structure about the encoding of Reline.
This commit is contained in:
parent
c94025b630
commit
f8ea2860b0
10 changed files with 48 additions and 30 deletions
|
@ -7,8 +7,8 @@ class Reline::LineEditor::StringProcessingTest < Reline::TestCase
|
|||
@config = Reline::Config.new
|
||||
Reline::HISTORY.instance_variable_set(:@config, @config)
|
||||
@encoding = (RELINE_TEST_ENCODING rescue Encoding.default_external)
|
||||
@line_editor = Reline::LineEditor.new(@config)
|
||||
@line_editor.reset(@prompt, @encoding)
|
||||
@line_editor = Reline::LineEditor.new(@config, @encoding)
|
||||
@line_editor.reset(@prompt, encoding: @encoding)
|
||||
end
|
||||
|
||||
def test_calculate_width
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue