ruby-changes:66537
From: aycabta <ko1@a...>
Date: Mon, 21 Jun 2021 19:31:29 +0900 (JST)
Subject: [ruby-changes:66537] 089a26b0a6 (master): Use Encoding.default_external for tests of Readline::HISTORY
https://git.ruby-lang.org/ruby.git/commit/?id=089a26b0a6 From 089a26b0a619a649b1958061df8f21a6cdc6cacd Mon Sep 17 00:00:00 2001 From: aycabta <aycabta@g...> Date: Mon, 21 Jun 2021 19:31:14 +0900 Subject: Use Encoding.default_external for tests of Readline::HISTORY --- test/readline/test_readline_history.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/readline/test_readline_history.rb b/test/readline/test_readline_history.rb index f4e93fa..793330e 100644 --- a/test/readline/test_readline_history.rb +++ b/test/readline/test_readline_history.rb @@ -244,11 +244,11 @@ module BasetestReadlineHistory https://github.com/ruby/ruby/blob/trunk/test/readline/test_readline_history.rb#L244 def assert_external_string_equal(expected, actual) assert_equal(expected, actual) - assert_equal(get_default_internal_encoding, actual.encoding) + assert_equal(get_default_encoding, actual.encoding) end - def get_default_internal_encoding - return Encoding.default_internal || Encoding.find("locale") + def get_default_encoding + return Encoding.default_external || Encoding.find("locale") end end @@ -277,7 +277,7 @@ class TestRelineAsReadlineHistory < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/readline/test_readline_history.rb#L277 super end - def get_default_internal_encoding + def get_default_encoding if RUBY_PLATFORM =~ /mswin|mingw/ Encoding.default_internal || Encoding::UTF_8 else -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/