diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/fileutils.rb | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Wed Dec 28 11:22:45 2011 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * 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 <nagachika00@gmail.com> * 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)) } |