diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-11-28 07:04:52 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-11-28 07:04:52 +0000 |
commit | da73c60789ad4ca6f33f1007535a1a720f126c5c (patch) | |
tree | 091934827cdc5e25d467e77aba7468d5476b6d6a | |
parent | 96dbe5b162091b07668240cf82713dcffdaacbd4 (diff) | |
download | ruby-da73c60789ad4ca6f33f1007535a1a720f126c5c.tar.gz ruby-da73c60789ad4ca6f33f1007535a1a720f126c5c.tar.xz ruby-da73c60789ad4ca6f33f1007535a1a720f126c5c.zip |
previous change refined.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | lib/pathname.rb | 7 |
1 files 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 = '/' |