summaryrefslogtreecommitdiff
path: root/lib/pathname.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-12 16:04:31 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-12 16:04:31 +0000
commit4627c5a19bca043c2e35aa84df68e133e0009530 (patch)
tree925c109587b1469b7d5c4ed58d6461fe8d668e5a /lib/pathname.rb
parent329c2cd72371c1a41b3eb547f3136df6fce8d7af (diff)
* lib/pathname.rb (cleanpath_aggressive): make it private.
(cleanpath_conservative): ditto. Suggested by Daniel Berger. [ruby-core:3914] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/pathname.rb')
-rw-r--r--lib/pathname.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/pathname.rb b/lib/pathname.rb
index bd8afb081d..be1cb29b43 100644
--- a/lib/pathname.rb
+++ b/lib/pathname.rb
@@ -256,7 +256,7 @@ class Pathname
# Clean the path simply by resolving and removing excess "." and ".." entries.
# Nothing more, nothing less.
#
- def cleanpath_aggressive # :nodoc:
+ def cleanpath_aggressive
# cleanpath_aggressive assumes:
# * no symlink
# * all pathname prefix contained in the pathname is existing directory
@@ -282,8 +282,9 @@ class Pathname
path << names.join('/')
Pathname.new(path)
end
+ private :cleanpath_aggressive
- def cleanpath_conservative # :nodoc:
+ def cleanpath_conservative
return Pathname.new('') if @path == ''
names = @path.scan(%r{[^/]+})
last_dot = names.last == '.'
@@ -301,6 +302,7 @@ class Pathname
end
Pathname.new(path)
end
+ private :cleanpath_conservative
#
# Returns a real (absolute) pathname of +self+ in the actual filesystem.