aboutsummaryrefslogtreecommitdiffstats
path: root/test/reline/test_within_pipe.rb
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2021-06-21 22:08:13 +0900
committeraycabta <aycabta@gmail.com>2021-06-21 22:12:14 +0900
commit1192393b3ed0952705e0faa476d84d757c50f1ce (patch)
treef78e7b44fbd06d4e7514bec3a0881a2e47f4a8f6 /test/reline/test_within_pipe.rb
parentaf19f9a6e9525b062ce3788f7120a8b72f737c6d (diff)
downloadruby-1192393b3ed0952705e0faa476d84d757c50f1ce.tar.gz
Stop using global constant, RELINE_TEST_ENCODING
Diffstat (limited to 'test/reline/test_within_pipe.rb')
-rw-r--r--test/reline/test_within_pipe.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/reline/test_within_pipe.rb b/test/reline/test_within_pipe.rb
index 9a2d61c92b..ff2d68bb82 100644
--- a/test/reline/test_within_pipe.rb
+++ b/test/reline/test_within_pipe.rb
@@ -3,9 +3,10 @@ require_relative 'helper'
class Reline::WithinPipeTest < Reline::TestCase
def setup
Reline.send(:test_mode)
- @input_reader, @writer = IO.pipe((RELINE_TEST_ENCODING rescue Encoding.default_external))
+ @encoding = Reline::IOGate.encoding
+ @input_reader, @writer = IO.pipe(@encoding)
Reline.input = @input_reader
- @reader, @output_writer = IO.pipe((RELINE_TEST_ENCODING rescue Encoding.default_external))
+ @reader, @output_writer = IO.pipe(@encoding)
@output = Reline.output = @output_writer
@config = Reline.send(:core).config
@config.keyseq_timeout *= 600 if defined?(RubyVM::JIT) && RubyVM::JIT.enabled? # for --jit-wait CI