зеркало из https://github.com/github/ruby.git
* 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:
Родитель
3ef1b8086e
Коммит
2d956bea23
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче