1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Use Encoding.default_external for tests of Readline::HISTORY

This commit is contained in:
aycabta 2021-06-21 19:31:14 +09:00
parent 30cc07fdc1
commit 089a26b0a6

View file

@ -244,11 +244,11 @@ module BasetestReadlineHistory
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
super
end
def get_default_internal_encoding
def get_default_encoding
if RUBY_PLATFORM =~ /mswin|mingw/
Encoding.default_internal || Encoding::UTF_8
else