summaryrefslogtreecommitdiff
path: root/lib/pathname.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-11-28 07:04:52 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-11-28 07:04:52 +0000
commit40cb49fce8575ff60ef761d03fe9ee1180622bc7 (patch)
tree091934827cdc5e25d467e77aba7468d5476b6d6a /lib/pathname.rb
parent7754869905d9b3554882f175ec09d6d68488e288 (diff)
previous change refined.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 = '/'