summaryrefslogtreecommitdiff
path: root/test/reline/test_history.rb
diff options
context:
space:
mode:
authorStan Lo <stan001212@gmail.com>2023-07-07 18:27:14 +0100
committergit <svn-admin@ruby-lang.org>2023-07-07 17:27:25 +0000
commit24d9e21f84eced634b3e443ada2a57621b2b4b9b (patch)
tree96ecaa8228d6b04c80b48047e8a77abc15b5cb61 /test/reline/test_history.rb
parenta642a94b68a31c0e7c092087114c269132cdb159 (diff)
[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
Diffstat (limited to 'test/reline/test_history.rb')
-rw-r--r--test/reline/test_history.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/reline/test_history.rb b/test/reline/test_history.rb
index 53360409bc..ddf8fb1472 100644
--- a/test/reline/test_history.rb
+++ b/test/reline/test_history.rb
@@ -297,7 +297,7 @@ class Reline::History::Test < Reline::TestCase
end
def get_default_internal_encoding
- if encoding = Reline::IOGate.encoding
+ if encoding = Reline.core.encoding
encoding
elsif RUBY_PLATFORM =~ /mswin|mingw/
Encoding.default_internal || Encoding::UTF_8