summaryrefslogtreecommitdiff
path: root/lib/pathname.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-11-28 06:43:51 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-11-28 06:43:51 +0000
commit7754869905d9b3554882f175ec09d6d68488e288 (patch)
tree8c5c21827e1ce50b74b1f19f136536255edd3396 /lib/pathname.rb
parent42bca643c3ec41782d519c7676383f8f71e67a7a (diff)
* lib/pathname.rb (Pathname#realpath): obsolete the force_absolute
argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/pathname.rb')
-rw-r--r--lib/pathname.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/pathname.rb b/lib/pathname.rb
index 6f78f17fc8..5fc8a0086b 100644
--- a/lib/pathname.rb
+++ b/lib/pathname.rb
@@ -109,10 +109,12 @@ class Pathname
# realpath returns a real pathname of self in actual filesystem.
# The real pathname doesn't contain a symlink and useless dots.
#
- # If false is given for the optional argument force_absolute,
- # it may return relative pathname.
- # Otherwise it returns absolute pathname.
+ # It returns absolute pathname.
def realpath(force_absolute=true)
+ unless force_absolute
+ warn "Pathname#realpath's force_absolute argument is obsoleted."
+ end
+
if %r{\A/} =~ @path
top = '/'
unresolved = @path.scan(%r{[^/]+})