mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
previous change refined.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7754869905
commit
40cb49fce8
1 changed files with 4 additions and 3 deletions
|
@ -110,10 +110,11 @@ class Pathname
|
||||||
# The real pathname doesn't contain a symlink and useless dots.
|
# The real pathname doesn't contain a symlink and useless dots.
|
||||||
#
|
#
|
||||||
# It returns absolute pathname.
|
# It returns absolute pathname.
|
||||||
def realpath(force_absolute=true)
|
def realpath(*args)
|
||||||
unless force_absolute
|
unless args.empty?
|
||||||
warn "Pathname#realpath's force_absolute argument is obsoleted."
|
warn "The argument for Pathname#realpath is obsoleted."
|
||||||
end
|
end
|
||||||
|
force_absolute = args.fetch(0, true)
|
||||||
|
|
||||||
if %r{\A/} =~ @path
|
if %r{\A/} =~ @path
|
||||||
top = '/'
|
top = '/'
|
||||||
|
|
Loading…
Reference in a new issue