Skip to content

Commit

Permalink
* ext/pathname/lib/pathname.rb: Hide private methods from RDoc.
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
drbrain committed Dec 11, 2012
1 parent 10c014b commit d5ba73e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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>

* tool/make-snapshot (BASERUBY): add --disable-gem to avoid load gems.
Expand Down
18 changes: 9 additions & 9 deletions ext/pathname/lib/pathname.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class Pathname
# :startdoc:

# chop_basename(path) -> [pre-basename, basename] or nil
def chop_basename(path)
def chop_basename(path) # :nodoc:
base = File.basename(path)
if /\A#{SEPARATOR_PAT}?\z/o =~ base
return nil
Expand All @@ -50,7 +50,7 @@ def chop_basename(path)
private :chop_basename

# split_names(path) -> prefix, [name, ...]
def split_names(path)
def split_names(path) # :nodoc:
names = []
while r = chop_basename(path)
path, basename = r
Expand All @@ -60,7 +60,7 @@ def split_names(path)
end
private :split_names

def prepend_prefix(prefix, relpath)
def prepend_prefix(prefix, relpath) # :nodoc:
if relpath.empty?
File.dirname(prefix)
elsif /#{SEPARATOR_PAT}/o =~ prefix
Expand Down Expand Up @@ -95,7 +95,7 @@ def cleanpath(consider_symlink=false)
# Clean the path simply by resolving and removing excess +.+ and +..+ entries.
# Nothing more, nothing less.
#
def cleanpath_aggressive
def cleanpath_aggressive # :nodoc:
path = @path
names = []
pre = path
Expand All @@ -121,7 +121,7 @@ def cleanpath_aggressive
private :cleanpath_aggressive

# has_trailing_separator?(path) -> bool
def has_trailing_separator?(path)
def has_trailing_separator?(path) # :nodoc:
if r = chop_basename(path)
pre, basename = r
pre.length + basename.length < path.length
Expand All @@ -132,7 +132,7 @@ def has_trailing_separator?(path)
private :has_trailing_separator?

# add_trailing_separator(path) -> path
def add_trailing_separator(path)
def add_trailing_separator(path) # :nodoc:
if File.basename(path + 'a') == 'a'
path
else
Expand All @@ -141,7 +141,7 @@ def add_trailing_separator(path)
end
private :add_trailing_separator

def del_trailing_separator(path)
def del_trailing_separator(path) # :nodoc:
if r = chop_basename(path)
pre, basename = r
pre + basename
Expand All @@ -153,7 +153,7 @@ def del_trailing_separator(path)
end
private :del_trailing_separator

def cleanpath_conservative
def cleanpath_conservative # :nodoc:
path = @path
names = []
pre = path
Expand Down Expand Up @@ -331,7 +331,7 @@ def +(other)
Pathname.new(plus(@path, other.to_s))
end

def plus(path1, path2) # -> path
def plus(path1, path2) # -> path # :nodoc:
prefix2 = path2
index_list2 = []
basename_list2 = []
Expand Down

0 comments on commit d5ba73e

Please sign in to comment.