From 32c5c675f2e38ab1bb40b9310b63a535a73cb116 Mon Sep 17 00:00:00 2001 From: naruse Date: Tue, 21 May 2013 06:08:04 +0000 Subject: force_encoding expected result as filesystem encoding git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_dir_m17n.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/ruby/test_dir_m17n.rb') diff --git a/test/ruby/test_dir_m17n.rb b/test/ruby/test_dir_m17n.rb index 2f8b1baef3..9e72e19695 100644 --- a/test/ruby/test_dir_m17n.rb +++ b/test/ruby/test_dir_m17n.rb @@ -320,6 +320,10 @@ class TestDir_M17N < Test::Unit::TestCase if /mswin|mingw/ =~ RUBY_PLATFORM opts = {:encoding => Encoding.default_external} orig.map! {|o| o.encode(Encoding.find("filesystem")) rescue o.tr("^a-z", "?")} + else + enc = Encoding.find("filesystem") + enc = Encoding::ASCII_8BIT if enc == Encoding::US_ASCII + orig.map {|o| o.force_encoding(enc) } end ents = Dir.entries(".", opts).reject {|n| /\A\./ =~ n} pp.assert_equal(orig, ents, bug7267) -- cgit v1.2.3