From 0daf636e7a3bb46d42c26e90bc863682aff6c96c Mon Sep 17 00:00:00 2001 From: naruse Date: Tue, 24 Jul 2012 09:57:59 +0000 Subject: Unix doesn't use win_expected_filename. r36519's essensial part is not to use filename.force_encoding("euc-jp"). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_dir_m17n.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'test') diff --git a/test/ruby/test_dir_m17n.rb b/test/ruby/test_dir_m17n.rb index 99880a41fe..2cf1c15441 100644 --- a/test/ruby/test_dir_m17n.rb +++ b/test/ruby/test_dir_m17n.rb @@ -196,9 +196,7 @@ class TestDir_M17N < Test::Unit::TestCase EOS assert_ruby_status(%w[-EASCII-8BIT], <<-'EOS', nil, :chdir=>d) filename = "\xA4\xA2".force_encoding('ASCII-8BIT') - win_expected_filename = - [Encoding::US_ASCII, Encoding::ASCII_8BIT].include?(Encoding.find("filesystem")) \ - ? filename : filename.encode(Encoding.find("filesystem"), "euc-jp") rescue "?" + win_expected_filename = filename.encode(Encoding.find("filesystem"), "euc-jp") rescue "?" opts = {:encoding => Encoding.default_external} if /mswin|mingw/ =~ RUBY_PLATFORM ents = Dir.entries(".", opts) result = ents.include?(filename) || -- cgit v1.2.3