summaryrefslogtreecommitdiff
path: root/test/ruby/test_dir_m17n.rb
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-07-24 09:57:59 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-07-24 09:57:59 +0000
commit0daf636e7a3bb46d42c26e90bc863682aff6c96c (patch)
tree197f7ee3c680fcebddc2dabfb90edcdf59c278f6 /test/ruby/test_dir_m17n.rb
parentcd1a6ab82bf4c7fd02701ba05272140fd2a670f5 (diff)
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
Diffstat (limited to 'test/ruby/test_dir_m17n.rb')
-rw-r--r--test/ruby/test_dir_m17n.rb4
1 files changed, 1 insertions, 3 deletions
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) ||