Skip to content

Commit d99e626

Browse files
committed
[DOC] Doc for ::getwd
1 parent 056d6ff commit d99e626

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

lib/pathname_builtin.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1116,7 +1116,14 @@ def glob(*args, **kwargs) # :yield: pathname
11161116
end
11171117
end
11181118

1119-
# See <tt>Dir.getwd</tt>. Returns the current working directory as a Pathname.
1119+
# call-seq:
1120+
# Pathname.getwd -> new_pathname
1121+
#
1122+
# Returns a new \Pathname object containing the path to the current working directory
1123+
# (equivalent to <tt>Pathname.new(Dir.getwd)</tt>):
1124+
#
1125+
# Pathname.getwd # => #<Pathname:/home>
1126+
#
11201127
def Pathname.getwd() self.new(Dir.getwd) end
11211128
class << self
11221129
alias pwd getwd

0 commit comments

Comments
 (0)