diff options
author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-10-15 15:31:03 +0000 |
---|---|---|
committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-10-15 15:31:03 +0000 |
commit | c17ee1100763373f069a06adcdb85283e3f16626 (patch) | |
tree | d29926928246d8d5c67df87e3bdac20c688aedb6 /lib | |
parent | 03a93ba48da930f0f35ac83da7853cd89f94a8f4 (diff) |
merge revision(s) r47900: [Backport #10035]
* 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/branches/ruby_2_1@47958 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 6f3e4282ed..d33c8bb16b 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 |