[前][次][番号順一覧][スレッド一覧]

ruby-changes:61679

From: Kazuhiro <ko1@a...>
Date: Thu, 11 Jun 2020 17:13:40 +0900 (JST)
Subject: [ruby-changes:61679] 2dd61df69f (master): Revert encoding to `::Encoding::UTF_8` if `fu_windows?`

https://git.ruby-lang.org/ruby.git/commit/?id=2dd61df69f

From 2dd61df69f776f275ee68e9c4f0abbecd50a9379 Mon Sep 17 00:00:00 2001
From: Kazuhiro NISHIYAMA <zn@m...>
Date: Thu, 11 Jun 2020 17:12:11 +0900
Subject: Revert encoding to `::Encoding::UTF_8` if `fu_windows?`


diff --git a/lib/fileutils.rb b/lib/fileutils.rb
index baa3d18..64f3ae6 100644
--- a/lib/fileutils.rb
+++ b/lib/fileutils.rb
@@ -1290,7 +1290,7 @@ module FileUtils https://github.com/ruby/ruby/blob/trunk/lib/fileutils.rb#L1290
 
     def entries
       opts = {}
-      opts[:encoding] = path.encoding
+      opts[:encoding] = fu_windows? ? ::Encoding::UTF_8 : path.encoding
 
       files = if Dir.respond_to?(:children)
         Dir.children(path, **opts)
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]