diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-09-18 11:35:38 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-09-18 11:35:38 +0000 |
commit | fc69eddf5dd32512eb48fe627efd7b594e60e4f9 (patch) | |
tree | e27fa4e2938b8ddaa9a0f4baae3f58683f237dc7 /lib | |
parent | c79d0f90c5450da697afa9f149d20279e4eb7a9c (diff) | |
download | ruby-fc69eddf5dd32512eb48fe627efd7b594e60e4f9.tar.gz ruby-fc69eddf5dd32512eb48fe627efd7b594e60e4f9.tar.xz ruby-fc69eddf5dd32512eb48fe627efd7b594e60e4f9.zip |
lib/pathname.rb: update document.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pathname.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/pathname.rb b/lib/pathname.rb index 3a8edfc13..d48cef685 100644 --- a/lib/pathname.rb +++ b/lib/pathname.rb @@ -35,7 +35,7 @@ class Pathname # cleanpath returns clean pathname of self which is without consecutive # 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. # # cleanpath doesn't access actual filesystem. @@ -163,7 +163,7 @@ class Pathname self.join('..') end - # mountpoint? method returns true if self points mountpoint. + # mountpoint? method returns true if self points a mountpoint. def mountpoint? begin stat1 = self.lstat @@ -184,6 +184,7 @@ class Pathname =end # 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. # So it may return false for some pathnames @@ -215,7 +216,8 @@ class Pathname @path.scan(%r{[^/]+}) { yield $& } 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. def +(other) other = Pathname.new(other) unless Pathname === other |