test: use String#b instead of dup.force_encoding

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-12-14 06:40:55 +00:00
parent fcb4ab8d1c
commit c81b224edc
8 changed files with 17 additions and 23 deletions

View file

@ -208,7 +208,7 @@ class TestDir_M17N < Test::Unit::TestCase
when /darwin/
filename = filename.encode("utf-8", "euc-jp").b
when /mswin|mingw/
if ents.include?(win_expected_filename.dup.force_encoding("ASCII-8BIT"))
if ents.include?(win_expected_filename.b)
ents = Dir.entries(".", {:encoding => Encoding.find("filesystem")})
filename = win_expected_filename
end