Project

General

Profile

Feature #12034 » 0002-follow-up-for-OS-X.patch

fix failures on OS X - nobu (Nobuyoshi Nakada), 02/09/2016 04:31 AM

View differences:

test/ruby/test_dir_m17n.rb
opts = {:encoding => Encoding.default_external} if /mswin|mingw/ =~ RUBY_PLATFORM
ents = Dir.entries(".", opts)
if /darwin/ =~ RUBY_PLATFORM
filename = filename.encode("utf-8").force_encoding("euc-jp")
filename = filename.encode("utf-8").b
end
assert_include(ents, filename)
EOS
......
opts = {:encoding => Encoding.default_external} if /mswin|mingw/ =~ RUBY_PLATFORM
ents = Dir.entries(".", opts)
if /darwin/ =~ RUBY_PLATFORM
filename = filename.encode("utf-8", "euc-jp").force_encoding("euc-jp")
filename = filename.encode("utf-8").b
end
assert_include(ents, filename)
EOS
......
opts = {:encoding => Encoding.default_external} if /mswin|mingw/ =~ RUBY_PLATFORM
ents = Dir.entries(".", opts)
if /darwin/ =~ RUBY_PLATFORM
filename = filename.force_encoding("euc-jp")
filename = filename.b
end
assert_include(ents, filename)
EOS
(2-2/2)