aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/fileutils.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/fileutils.rb b/lib/fileutils.rb
index 8d1009bda3..46dfffb650 100644
--- a/lib/fileutils.rb
+++ b/lib/fileutils.rb
@@ -1342,7 +1342,7 @@ private
def entries
opts = {}
- opts[:encoding] = "UTF-8" if /mswin|mignw/ =~ RUBY_PLATFORM
+ opts[:encoding] = ::Encoding::UTF_8 if fu_windows?
Dir.entries(path(), opts)\
.reject {|n| n == '.' or n == '..' }\
.map {|n| Entry_.new(prefix(), join(rel(), n.untaint)) }