summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-13 07:34:23 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-13 07:34:23 +0000
commitc66506ef24db824b87ca04cec1600d93196f8db5 (patch)
tree89e8800ddae9b5f0fb605e47ef5abd46109eb737 /lib
parent89322aafb5829d18ac091853078957bed8eefe25 (diff)
* 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
Diffstat (limited to 'lib')
-rw-r--r--lib/find.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/find.rb b/lib/find.rb
index 46e2512b9e..55783a5695 100644
--- a/lib/find.rb
+++ b/lib/find.rb
@@ -40,6 +40,7 @@ module Find
fs_encoding = Encoding.find("filesystem")
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
ps = [path]
while file = ps.shift