diff options
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{[^/]+}) |