From 40cb49fce8575ff60ef761d03fe9ee1180622bc7 Mon Sep 17 00:00:00 2001 From: akr Date: Fri, 28 Nov 2003 07:04:52 +0000 Subject: [PATCH] previous change refined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/pathname.rb | 7 ++++--- 1 file 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 = '/'