diff options
| author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-11-28 06:43:51 +0000 |
|---|---|---|
| committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-11-28 06:43:51 +0000 |
| commit | 96dbe5b162091b07668240cf82713dcffdaacbd4 (patch) | |
| tree | 8c5c21827e1ce50b74b1f19f136536255edd3396 /lib/pathname.rb | |
| parent | aad1e0d556767a2cb90eeca94bb3f09bc999f891 (diff) | |
| download | ruby-96dbe5b162091b07668240cf82713dcffdaacbd4.tar.gz ruby-96dbe5b162091b07668240cf82713dcffdaacbd4.tar.xz ruby-96dbe5b162091b07668240cf82713dcffdaacbd4.zip | |
* lib/pathname.rb (Pathname#realpath): obsolete the force_absolute
argument.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/pathname.rb')
| -rw-r--r-- | lib/pathname.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/pathname.rb b/lib/pathname.rb index 6f78f17fc..5fc8a0086 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{[^/]+}) |
