summaryrefslogtreecommitdiff
path: root/lib/pathname.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pathname.rb')
-rw-r--r--lib/pathname.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/pathname.rb b/lib/pathname.rb
index 5fc8a0086b..027886ccd0 100644
--- a/lib/pathname.rb
+++ b/lib/pathname.rb
@@ -110,10 +110,11 @@ class Pathname
# The real pathname doesn't contain a symlink and useless dots.
#
# It returns absolute pathname.
- def realpath(force_absolute=true)
- unless force_absolute
- warn "Pathname#realpath's force_absolute argument is obsoleted."
+ def realpath(*args)
+ unless args.empty?
+ warn "The argument for Pathname#realpath is obsoleted."
end
+ force_absolute = args.fetch(0, true)
if %r{\A/} =~ @path
top = '/'