* 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
This commit is contained in:
parent
329c2cd723
commit
4627c5a19b
@ -1,3 +1,9 @@
|
||||
Mon Dec 13 00:58:02 2004 Tanaka Akira <akr@m17n.org>
|
||||
|
||||
* lib/pathname.rb (cleanpath_aggressive): make it private.
|
||||
(cleanpath_conservative): ditto.
|
||||
Suggested by Daniel Berger. [ruby-core:3914]
|
||||
|
||||
Sun Dec 12 21:32:14 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* test/ruby/test_super.rb (TestSuper#test_define_method): now methods
|
||||
|
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user