summaryrefslogtreecommitdiffstats
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
commit19f58495825ad49a6cc65b0e3bb3635bd7f99970 (patch)
tree51ad0571d9ac567b95b7fb4a644066b398395ba0
parent521ed348bb4c0586a974ac89d2b316b576d48565 (diff)
* 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/branches/ruby_1_8@7542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--lib/pathname.rb6
2 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index e239240db..f3b5d40fb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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 20:06:38 2004 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
* lib/drb/drb.rb: backported from CVS HEAD.
diff --git a/lib/pathname.rb b/lib/pathname.rb
index 663afcf5e..19630415c 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.