Parent

Class/Module Index [+]

Quicksearch

Dir

Public Class Methods

pwd_no_resolve() click to toggle source

Dir.pwd resolves symlinks. This version tries not to, by shelling out to the pwd tool.

# File lib/phusion_passenger/ruby_core_enhancements.rb, line 64
def self.pwd_no_resolve
  begin
    result = `pwd`.strip
  rescue Errno::ENOENT
    result = `/bin/pwd`.strip
  end
  if result.empty?
    return Dir.pwd
  else
    return result
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.