* ext/pathname/pathname.c (path_s_glob): Pathname.glob translated

from pathname.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2010-09-13 20:14:04 +00:00
parent 1428b74ff9
commit 6d9b5fdffc
4 changed files with 43 additions and 9 deletions

View file

@ -485,15 +485,6 @@ end
class Pathname # * Dir *
# See <tt>Dir.glob</tt>. Returns or yields Pathname objects.
def Pathname.glob(*args) # :yield: pathname
if block_given?
Dir.glob(*args) {|f| yield self.new(f) }
else
Dir.glob(*args).map {|f| self.new(f) }
end
end
# See <tt>Dir.getwd</tt>. Returns the current working directory as a Pathname.
def Pathname.getwd() self.new(Dir.getwd) end
class << self; alias pwd getwd end