1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/find.rb (Find.find): Call to_path for arguments to obtain

strings.
  [ruby-core:63713] [Bug #10035] Reported by Herwin.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2014-10-13 07:34:23 +00:00
parent 89322aafb5
commit c66506ef24
2 changed files with 7 additions and 0 deletions

View file

@ -1,3 +1,9 @@
Mon Oct 13 16:32:56 2014 Tanaka Akira <akr@fsij.org>
* lib/find.rb (Find.find): Call to_path for arguments to obtain
strings.
[ruby-core:63713] [Bug #10035] Reported by Herwin.
Mon Oct 13 15:42:25 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com> Mon Oct 13 15:42:25 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
* common.mk: use relative load path for bundled_gems directory. * common.mk: use relative load path for bundled_gems directory.

View file

@ -40,6 +40,7 @@ module Find
fs_encoding = Encoding.find("filesystem") fs_encoding = Encoding.find("filesystem")
paths.collect!{|d| raise Errno::ENOENT unless File.exist?(d); d.dup}.each do |path| paths.collect!{|d| raise Errno::ENOENT unless File.exist?(d); d.dup}.each do |path|
path = path.to_path if path.respond_to? :to_path
enc = path.encoding == Encoding::US_ASCII ? fs_encoding : path.encoding enc = path.encoding == Encoding::US_ASCII ? fs_encoding : path.encoding
ps = [path] ps = [path]
while file = ps.shift while file = ps.shift