See Dir.getwd. Returns the current working directory as a Pathname.
Dir.getwd
942
# File 'lib/pathname.rb', line 942 def Pathname.getwd() self.new(Dir.getwd) end