summaryrefslogtreecommitdiffstats
path: root/lib
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
commit9201adf040d86f81bcee0e9566db59883cfa58f5 (patch)
tree925c109587b1469b7d5c4ed58d6461fe8d668e5a /lib
parent0ef1feb673071cb66d0077cc840bc85e13f41beb (diff)
downloadruby-9201adf040d86f81bcee0e9566db59883cfa58f5.tar.gz
ruby-9201adf040d86f81bcee0e9566db59883cfa58f5.tar.xz
ruby-9201adf040d86f81bcee0e9566db59883cfa58f5.zip
* lib/pathname.rb (cleanpath_aggressive): make it private.
(cleanpath_conservative): ditto. Suggested by Daniel Berger. [ruby-core:3914] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/pathname.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/pathname.rb b/lib/pathname.rb
index bd8afb081..be1cb29b4 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.