diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-02-19 14:38:28 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-02-19 14:38:28 +0000 |
commit | 88afcb09beae9807fd4c763020b16bff16b3c6b4 (patch) | |
tree | a01d6e10e54e4b92b7971d9371f3c519e312de78 /lib/find.rb | |
parent | a82fb88f12a7d15297517f50b35304d2af38958a (diff) | |
download | ruby-88afcb09beae9807fd4c763020b16bff16b3c6b4.tar.gz |
find.rb: raise with the name
* lib/find.rb (Find#find): raise with the given path name if it
does not exist. [ruby-dev:49497] [Bug #12087]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/find.rb')
-rw-r--r-- | lib/find.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/find.rb b/lib/find.rb index aa7a3c082b..093f8557c3 100644 --- a/lib/find.rb +++ b/lib/find.rb @@ -40,7 +40,7 @@ module Find 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, d 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] |