summaryrefslogtreecommitdiff
path: root/ext/pathname/lib
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pathname/lib')
-rw-r--r--ext/pathname/lib/pathname.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/pathname/lib/pathname.rb b/ext/pathname/lib/pathname.rb
index 46fa72b784..20c92e23dc 100644
--- a/ext/pathname/lib/pathname.rb
+++ b/ext/pathname/lib/pathname.rb
@@ -534,13 +534,13 @@ class Pathname # * Find *
#
# See Find.find
#
- def find # :yield: pathname
- return to_enum(__method__) unless block_given?
+ def find(ignore_error: true) # :yield: pathname
+ return to_enum(__method__, ignore_error: ignore_error) unless block_given?
require 'find'
if @path == '.'
- Find.find(@path) {|f| yield self.class.new(f.sub(%r{\A\./}, '')) }
+ Find.find(@path, ignore_error: ignore_error) {|f| yield self.class.new(f.sub(%r{\A\./}, '')) }
else
- Find.find(@path) {|f| yield self.class.new(f) }
+ Find.find(@path, ignore_error: ignore_error) {|f| yield self.class.new(f) }
end
end
end