1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/pathname.rb (realpath): check existence of the file.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2003-10-11 07:09:19 +00:00
parent b01f0cab31
commit 31fd8aa681
2 changed files with 4 additions and 2 deletions

View file

@ -123,7 +123,7 @@ class Pathname
resolved.unshift unresolved.pop
else
path = top + unresolved.join('/')
if FileTest.symlink? path
if File.lstat(path).symlink?
link = File.readlink(path)
if %r{\A/} =~ link
top = '/'