mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/pathname/lib/pathname.rb: Hide private methods from RDoc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
10c014b06d
commit
d5ba73e0d9
2 changed files with 13 additions and 9 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
Tue Dec 11 15:24:05 2012 Eric Hodel <drbrain@segment7.net>
|
||||||
|
|
||||||
|
* ext/pathname/lib/pathname.rb: Hide private methods from RDoc.
|
||||||
|
|
||||||
Tue Dec 11 15:11:29 2012 NARUSE, Yui <naruse@ruby-lang.org>
|
Tue Dec 11 15:11:29 2012 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
* tool/make-snapshot (BASERUBY): add --disable-gem to avoid load gems.
|
* tool/make-snapshot (BASERUBY): add --disable-gem to avoid load gems.
|
||||||
|
|
|
@ -39,7 +39,7 @@ class Pathname
|
||||||
# :startdoc:
|
# :startdoc:
|
||||||
|
|
||||||
# chop_basename(path) -> [pre-basename, basename] or nil
|
# chop_basename(path) -> [pre-basename, basename] or nil
|
||||||
def chop_basename(path)
|
def chop_basename(path) # :nodoc:
|
||||||
base = File.basename(path)
|
base = File.basename(path)
|
||||||
if /\A#{SEPARATOR_PAT}?\z/o =~ base
|
if /\A#{SEPARATOR_PAT}?\z/o =~ base
|
||||||
return nil
|
return nil
|
||||||
|
@ -50,7 +50,7 @@ class Pathname
|
||||||
private :chop_basename
|
private :chop_basename
|
||||||
|
|
||||||
# split_names(path) -> prefix, [name, ...]
|
# split_names(path) -> prefix, [name, ...]
|
||||||
def split_names(path)
|
def split_names(path) # :nodoc:
|
||||||
names = []
|
names = []
|
||||||
while r = chop_basename(path)
|
while r = chop_basename(path)
|
||||||
path, basename = r
|
path, basename = r
|
||||||
|
@ -60,7 +60,7 @@ class Pathname
|
||||||
end
|
end
|
||||||
private :split_names
|
private :split_names
|
||||||
|
|
||||||
def prepend_prefix(prefix, relpath)
|
def prepend_prefix(prefix, relpath) # :nodoc:
|
||||||
if relpath.empty?
|
if relpath.empty?
|
||||||
File.dirname(prefix)
|
File.dirname(prefix)
|
||||||
elsif /#{SEPARATOR_PAT}/o =~ prefix
|
elsif /#{SEPARATOR_PAT}/o =~ prefix
|
||||||
|
@ -95,7 +95,7 @@ class Pathname
|
||||||
# Clean the path simply by resolving and removing excess +.+ and +..+ entries.
|
# Clean the path simply by resolving and removing excess +.+ and +..+ entries.
|
||||||
# Nothing more, nothing less.
|
# Nothing more, nothing less.
|
||||||
#
|
#
|
||||||
def cleanpath_aggressive
|
def cleanpath_aggressive # :nodoc:
|
||||||
path = @path
|
path = @path
|
||||||
names = []
|
names = []
|
||||||
pre = path
|
pre = path
|
||||||
|
@ -121,7 +121,7 @@ class Pathname
|
||||||
private :cleanpath_aggressive
|
private :cleanpath_aggressive
|
||||||
|
|
||||||
# has_trailing_separator?(path) -> bool
|
# has_trailing_separator?(path) -> bool
|
||||||
def has_trailing_separator?(path)
|
def has_trailing_separator?(path) # :nodoc:
|
||||||
if r = chop_basename(path)
|
if r = chop_basename(path)
|
||||||
pre, basename = r
|
pre, basename = r
|
||||||
pre.length + basename.length < path.length
|
pre.length + basename.length < path.length
|
||||||
|
@ -132,7 +132,7 @@ class Pathname
|
||||||
private :has_trailing_separator?
|
private :has_trailing_separator?
|
||||||
|
|
||||||
# add_trailing_separator(path) -> path
|
# add_trailing_separator(path) -> path
|
||||||
def add_trailing_separator(path)
|
def add_trailing_separator(path) # :nodoc:
|
||||||
if File.basename(path + 'a') == 'a'
|
if File.basename(path + 'a') == 'a'
|
||||||
path
|
path
|
||||||
else
|
else
|
||||||
|
@ -141,7 +141,7 @@ class Pathname
|
||||||
end
|
end
|
||||||
private :add_trailing_separator
|
private :add_trailing_separator
|
||||||
|
|
||||||
def del_trailing_separator(path)
|
def del_trailing_separator(path) # :nodoc:
|
||||||
if r = chop_basename(path)
|
if r = chop_basename(path)
|
||||||
pre, basename = r
|
pre, basename = r
|
||||||
pre + basename
|
pre + basename
|
||||||
|
@ -153,7 +153,7 @@ class Pathname
|
||||||
end
|
end
|
||||||
private :del_trailing_separator
|
private :del_trailing_separator
|
||||||
|
|
||||||
def cleanpath_conservative
|
def cleanpath_conservative # :nodoc:
|
||||||
path = @path
|
path = @path
|
||||||
names = []
|
names = []
|
||||||
pre = path
|
pre = path
|
||||||
|
@ -331,7 +331,7 @@ class Pathname
|
||||||
Pathname.new(plus(@path, other.to_s))
|
Pathname.new(plus(@path, other.to_s))
|
||||||
end
|
end
|
||||||
|
|
||||||
def plus(path1, path2) # -> path
|
def plus(path1, path2) # -> path # :nodoc:
|
||||||
prefix2 = path2
|
prefix2 = path2
|
||||||
index_list2 = []
|
index_list2 = []
|
||||||
basename_list2 = []
|
basename_list2 = []
|
||||||
|
|
Loading…
Add table
Reference in a new issue