aboutsummaryrefslogtreecommitdiffstats
path: root/lib/fileutils.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-12-28 02:22:52 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-12-28 02:22:52 +0000
commit6a6c314fd0e2e6e3e370478dd8ee8d11ae285e58 (patch)
tree8d7634cb434ff46f8ad7ffe4057fa40cbf2d7389 /lib/fileutils.rb
parentddec35cf3db81fae5c46f3ed6f3eac5dbf4a5c17 (diff)
downloadruby-6a6c314fd0e2e6e3e370478dd8ee8d11ae285e58.tar.gz
* lib/fileutils.rb (FileUtils::Entry_#entries): use utility method
instead of typoed regexp. [ruby-core:41829] [Bug #5817] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/fileutils.rb')
-rw-r--r--lib/fileutils.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/fileutils.rb b/lib/fileutils.rb
index 168bef7405..0209adce50 100644
--- a/lib/fileutils.rb
+++ b/lib/fileutils.rb
@@ -1271,7 +1271,7 @@ module FileUtils
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)) }