Hello, I'm new Ruby and I like it very much. The dynamic extensibility
and iterators are very useful.
I was working with lib/find.rb and found that it would choke on
Permission denied errors so I added EACCES to the rescue expression.
It's a 15 byte difference, but here's the patch anyway:
--- find.rb.orig Mon Mar 19 14:05:12 2001
+++ find.rb Mon Mar 19 14:07:14 2001
@@ -32,7 +32,7 @@
d.close
end
end
- rescue Errno::ENOENT
+ rescue Errno::ENOENT, Errno::EACCES
end
end
end
I also found it useful to extend the Find module with a collect-like
method (with an optional block) so I could generate an array of files.
I was surprised how cleanly this could be done--I didn't have to make
my own version of the module or make some random function that I'd end
up recoding every time I needed.
Tyler