diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-02-20 04:48:55 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-02-20 04:48:55 +0000 |
commit | 2d956bea23588a9a16a0d42149d8544e9a049689 (patch) | |
tree | e07c42b1bd72aac6f2362348949ebe254e76d287 | |
parent | 3ef1b8086e962830a7672b02449d48fb3cabc001 (diff) | |
download | ruby-2d956bea23588a9a16a0d42149d8544e9a049689.tar.gz |
* lib/find.rb: should raise ENOENT if root entry does not exist,
without opening it. [ruby-dev:28345]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/find.rb | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Mon Feb 20 13:46:19 2006 NAKAMURA Usaku <usa@ruby-lang.org> + + * lib/find.rb: should raise ENOENT if root entry does not exist, + without opening it. [ruby-dev:28345] + Mon Feb 20 12:27:53 2006 Kent Sibilev <ksruby@gmail.com> * lib/rational.rb (Integer::gcd): small typo fix. diff --git a/lib/find.rb b/lib/find.rb index b2e811e614..06ac9e2c0c 100644 --- a/lib/find.rb +++ b/lib/find.rb @@ -33,7 +33,7 @@ module Find # See the +Find+ module documentation for an example. # def find(*paths) # :yield: path - paths.collect!{|d| open(d){}; d.dup} + paths.collect!{|d| raise Errno::ENOENT unless File.exist?(d); d.dup} while file = paths.shift catch(:prune) do yield file.dup.taint |