summaryrefslogtreecommitdiff
path: root/lib/rdoc/context.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-02-24 07:39:37 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-02-24 07:39:37 +0000
commitdf3e22ce84c2b19de9833f3b642098ee5abd826a (patch)
treeac513707b2dfc108f844d6338dc5e1933d189819 /lib/rdoc/context.rb
parent0f081edf7e2459dc22672cfa8f27c00fea5e24ad (diff)
Update rdoc-5.1.0
* Details of changes are following url. https://github.com/rdoc/rdoc/blob/master/History.rdoc#510--2017-02-24 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/context.rb')
-rw-r--r--lib/rdoc/context.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/rdoc/context.rb b/lib/rdoc/context.rb
index dc34c3f34b..7cfd9a89b4 100644
--- a/lib/rdoc/context.rb
+++ b/lib/rdoc/context.rb
@@ -99,6 +99,11 @@ class RDoc::Context < RDoc::CodeObject
attr_accessor :visibility
##
+ # Current visibility of this line
+
+ attr_writer :current_line_visibility
+
+ ##
# Hash of registered methods. Attributes are also registered here,
# twice if they are RW.
@@ -148,6 +153,7 @@ class RDoc::Context < RDoc::CodeObject
@extends = []
@constants = []
@external_aliases = []
+ @current_line_visibility = nil
# This Hash maps a method name to a list of unmatched aliases (aliases of
# a method not yet encountered).
@@ -478,7 +484,11 @@ class RDoc::Context < RDoc::CodeObject
end
else
@methods_hash[key] = method
- method.visibility = @visibility
+ if @current_line_visibility
+ method.visibility, @current_line_visibility = @current_line_visibility, nil
+ else
+ method.visibility = @visibility
+ end
add_to @method_list, method
resolve_aliases method
end