diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-02-24 07:39:37 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-02-24 07:39:37 +0000 |
commit | df3e22ce84c2b19de9833f3b642098ee5abd826a (patch) | |
tree | ac513707b2dfc108f844d6338dc5e1933d189819 /lib/rdoc/context.rb | |
parent | 0f081edf7e2459dc22672cfa8f27c00fea5e24ad (diff) | |
download | ruby-df3e22ce84c2b19de9833f3b642098ee5abd826a.tar.gz |
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.rb | 12 |
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 |