From da73c60789ad4ca6f33f1007535a1a720f126c5c Mon Sep 17 00:00:00 2001 From: akr Date: Fri, 28 Nov 2003 07:04:52 +0000 Subject: previous change refined. git-svn-id: http://svn.ruby-lang.org/repos/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 5fc8a0086..027886ccd 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 = '/' -- cgit