From 31fd8aa6814e590d10c4e962068a70c9cf708ce3 Mon Sep 17 00:00:00 2001 From: akr Date: Sat, 11 Oct 2003 07:09:19 +0000 Subject: * 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 --- lib/pathname.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/pathname.rb b/lib/pathname.rb index 7bd007a2c8..9ececcb074 100644 --- a/lib/pathname.rb +++ b/lib/pathname.rb @@ -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 = '/' -- cgit v1.2.3