From 6a6c314fd0e2e6e3e370478dd8ee8d11ae285e58 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 28 Dec 2011 02:22:52 +0000 Subject: [PATCH] * 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 --- ChangeLog | 5 +++++ lib/fileutils.rb | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 26b760bcfb..3a77e841ef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Dec 28 11:22:45 2011 Nobuyoshi Nakada + + * lib/fileutils.rb (FileUtils::Entry_#entries): use utility method + instead of typoed regexp. [ruby-core:41829] [Bug #5817] + Wed Dec 28 02:08:04 2011 CHIKANAGA Tomoyuki * vm_insnhelper.c (unknown_keyword_error): add GC guard to prevent 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)) }