diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-17 02:10:42 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-17 02:10:42 +0000 |
commit | 777f21290a9a909471e2a30daf6878d1f75ebe9e (patch) | |
tree | c9478583b5b91befd07631f77f14832488fc19d9 /lib | |
parent | 0deda73c33c7065a7356a56f988746fc9dae728d (diff) |
merge from trunk (r27856, r27857)
* lib/fileutils.rb (FileUtils::Entry_#entries): returns pathname in
UTF-8 on Windows to allow FileUtils accessing all pathnames
internally.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@27858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/fileutils.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/fileutils.rb b/lib/fileutils.rb index c65f007b8a..f2afdfbcf7 100644 --- a/lib/fileutils.rb +++ b/lib/fileutils.rb @@ -1176,7 +1176,9 @@ module FileUtils end def entries - Dir.entries(path())\ + opts = {} + opts[:encoding] = "UTF-8" if /mswin|mignw/ =~ RUBY_PLATFORM + Dir.entries(path(), opts)\ .reject {|n| n == '.' or n == '..' }\ .map {|n| Entry_.new(prefix(), join(rel(), n.untaint)) } end |