From 7754869905d9b3554882f175ec09d6d68488e288 Mon Sep 17 00:00:00 2001 From: akr Date: Fri, 28 Nov 2003 06:43:51 +0000 Subject: * 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 --- lib/pathname.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib') 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{[^/]+}) -- cgit v1.2.3