lib/pathname.rb: update document.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c40f4227f5
commit
def3aa514a
@ -1,3 +1,7 @@
|
|||||||
|
Thu Sep 18 20:30:17 2003 Tanaka Akira <akr@m17n.org>
|
||||||
|
|
||||||
|
* lib/pathname.rb: update document.
|
||||||
|
|
||||||
Mon Sep 18 15:27:05 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>
|
Mon Sep 18 15:27:05 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>
|
||||||
|
|
||||||
* lib/logger.rb: new file. Logger, formerly called devel-logger or
|
* lib/logger.rb: new file. Logger, formerly called devel-logger or
|
||||||
|
@ -35,7 +35,7 @@ class Pathname
|
|||||||
# cleanpath returns clean pathname of self which is without consecutive
|
# cleanpath returns clean pathname of self which is without consecutive
|
||||||
# slashes and useless dots.
|
# slashes and useless dots.
|
||||||
#
|
#
|
||||||
# If true is given to the optional artument consider_symlink,
|
# If true is given as the optional argument consider_symlink,
|
||||||
# symbolic links are considered. It makes more dots are retained.
|
# symbolic links are considered. It makes more dots are retained.
|
||||||
#
|
#
|
||||||
# cleanpath doesn't access actual filesystem.
|
# cleanpath doesn't access actual filesystem.
|
||||||
@ -163,7 +163,7 @@ class Pathname
|
|||||||
self.join('..')
|
self.join('..')
|
||||||
end
|
end
|
||||||
|
|
||||||
# mountpoint? method returns true if self points mountpoint.
|
# mountpoint? method returns true if self points a mountpoint.
|
||||||
def mountpoint?
|
def mountpoint?
|
||||||
begin
|
begin
|
||||||
stat1 = self.lstat
|
stat1 = self.lstat
|
||||||
@ -184,6 +184,7 @@ class Pathname
|
|||||||
=end
|
=end
|
||||||
|
|
||||||
# root? method is a predicate for root directory.
|
# root? method is a predicate for root directory.
|
||||||
|
# I.e. it returns true if the pathname consists of consecutive slashes.
|
||||||
#
|
#
|
||||||
# It doesn't access actual filesystem.
|
# It doesn't access actual filesystem.
|
||||||
# So it may return false for some pathnames
|
# So it may return false for some pathnames
|
||||||
@ -215,7 +216,8 @@ class Pathname
|
|||||||
@path.scan(%r{[^/]+}) { yield $& }
|
@path.scan(%r{[^/]+}) { yield $& }
|
||||||
end
|
end
|
||||||
|
|
||||||
# Pathname#+ return new pathname which is concatinated with self and an argument.
|
# Pathname#+ return new pathname which is concatenated with self and
|
||||||
|
# an argument.
|
||||||
# If the argument is absolute pathname, it is just returned.
|
# If the argument is absolute pathname, it is just returned.
|
||||||
def +(other)
|
def +(other)
|
||||||
other = Pathname.new(other) unless Pathname === other
|
other = Pathname.new(other) unless Pathname === other
|
||||||
|
Loading…
x
Reference in New Issue
Block a user