Skip to content

Commit

Permalink
Fixed #1944. Don't know how pathname is being merged from Ruby 2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
enebo committed Sep 3, 2014
1 parent 7436582 commit 150c4ec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/ruby/2.1/pathname.rb
Expand Up @@ -994,7 +994,8 @@ class Pathname # * Find *
# If +self+ is <tt>.</tt>, yielded pathnames begin with a filename in the
# current directory, not <tt>./</tt>.
#
def find(&block) # :yield: pathname
def find # :yield: pathname
return to_enum(__method__) unless block_given?
require 'find'
if @path == '.'
Find.find(@path) {|f| yield self.class.new(f.sub(%r{\A\./}, '')) }
Expand Down

0 comments on commit 150c4ec

Please sign in to comment.