From c66506ef24db824b87ca04cec1600d93196f8db5 Mon Sep 17 00:00:00 2001 From: akr Date: Mon, 13 Oct 2014 07:34:23 +0000 Subject: * 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 --- lib/find.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/find.rb') 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 -- cgit v1.2.3