summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-11-15 14:50:14 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-11-15 14:50:14 +0000
commitc42184c8bb49c397064bfa1260914fd9b90b9b22 (patch)
tree56c2fbcfc166534deb69c224db487ef424e47e25
parent3e04f508d4630f8591ad1e1f23faff55bd9171b7 (diff)
downloadruby-c42184c8bb49c397064bfa1260914fd9b90b9b22.tar.gz
ruby-c42184c8bb49c397064bfa1260914fd9b90b9b22.tar.xz
ruby-c42184c8bb49c397064bfa1260914fd9b90b9b22.zip
* lib/find.rb (Find::find): should not ignore symbolic links to
non-existing files. [ruby-talk:165866] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--lib/find.rb4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 123aa7eda..a6c290a0f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Nov 15 23:46:35 2005 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * lib/find.rb (Find::find): should not ignore symbolic links to
+ non-existing files. [ruby-talk:165866]
+
Tue Nov 15 16:23:26 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
* array.c (rb_ary_fill): previous commit disabled this usage:
diff --git a/lib/find.rb b/lib/find.rb
index 52efde81f..0d22dd62d 100644
--- a/lib/find.rb
+++ b/lib/find.rb
@@ -36,8 +36,8 @@ module Find
paths.collect!{|d| d.dup}
while file = paths.shift
catch(:prune) do
- next unless File.exist? file
yield file.dup.taint
+ next unless File.exist? file
begin
if File.lstat(file).directory? then
d = Dir.open(file)
@@ -57,7 +57,7 @@ module Find
d.close
end
end
- rescue Errno::ENOENT, Errno::EACCES
+ rescue Errno::ENOENT, Errno::EACCES
end
end
end