From 6a6c314fd0e2e6e3e370478dd8ee8d11ae285e58 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 28 Dec 2011 02:22:52 +0000 Subject: * 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 --- lib/fileutils.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/fileutils.rb') 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)) } -- cgit v1.2.3