1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
usa 2006-02-20 04:48:55 +00:00
parent 3ef1b8086e
commit 2d956bea23
2 changed files with 6 additions and 1 deletions

View file

@ -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.

View file

@ -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