diff options
Diffstat (limited to 'lib/pathname.rb')
-rw-r--r-- | lib/pathname.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/pathname.rb b/lib/pathname.rb index 663afcf5ed..19630415c1 100644 --- a/lib/pathname.rb +++ b/lib/pathname.rb @@ -254,7 +254,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 @@ -280,8 +280,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 == '.' @@ -299,6 +300,7 @@ class Pathname end Pathname.new(path) end + private :cleanpath_conservative # # Returns a real (absolute) pathname of +self+ in the actual filesystem. |