diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-12-28 02:22:52 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-12-28 02:22:52 +0000 |
commit | 31b097cad21623feecdaf87c529a3923c0115900 (patch) | |
tree | 84eb7561f48e1742d7d00e63a420129a3a43ede8 | |
parent | 63783f2c9735c6ce9605fde4c658ac9cd6df4c8b (diff) |
* 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/branches/ruby_1_9_2@34146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-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] + Fri Jul 1 06:41:36 2011 Koichi Sasada <ko1@atdot.net> * thread.c (rb_threadptr_check_signal): only wake up main thread. diff --git a/lib/fileutils.rb b/lib/fileutils.rb index 9cd1a7cc76..5218b57d5b 100644 --- a/lib/fileutils.rb +++ b/lib/fileutils.rb @@ -1182,7 +1182,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)) } |