diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-10-13 07:34:23 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-10-13 07:34:23 +0000 |
commit | c66506ef24db824b87ca04cec1600d93196f8db5 (patch) | |
tree | 89e8800ddae9b5f0fb605e47ef5abd46109eb737 /lib | |
parent | 89322aafb5829d18ac091853078957bed8eefe25 (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.rb | 1 |
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 |