summaryrefslogtreecommitdiff
path: root/lib/fileutils.rb
diff options
context:
space:
mode:
authorKazuhiro NISHIYAMA <zn@mbf.nifty.com>2020-06-22 18:15:21 +0900
committerKazuhiro NISHIYAMA <zn@mbf.nifty.com>2020-06-22 18:18:16 +0900
commit7ac6c967e49d1e3ad46be20aca98e8f1df2c2d5b (patch)
tree86ba446b20b9fec89a5a89b9f0710b67d0385c99 /lib/fileutils.rb
parent78352fb52ed2c15fe0d74c02ea29b7e5a28b18c0 (diff)
downloadruby-7ac6c967e49d1e3ad46be20aca98e8f1df2c2d5b.tar.gz
Revert d231b8f95b35d8a344cec4f62d7bbdf360a70e1c and add debug print
Diffstat (limited to 'lib/fileutils.rb')
-rw-r--r--lib/fileutils.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/fileutils.rb b/lib/fileutils.rb
index 371a348159..438f3210f7 100644
--- a/lib/fileutils.rb
+++ b/lib/fileutils.rb
@@ -1287,11 +1287,7 @@ module FileUtils
def entries
opts = {}
- if fu_windows? && ::Encoding.compatible?(::Encoding::UTF_8, path.encoding)
- opts[:encoding] = ::Encoding::UTF_8
- else
- opts[:encoding] = path.encoding
- end
+ opts[:encoding] = fu_windows? ? ::Encoding::UTF_8 : path.encoding
files = if Dir.respond_to?(:children)
Dir.children(path, **opts)