@@ -29,10 +29,6 @@ class RDoc::AnyMethod < RDoc::MethodAttr
2929 # The section title of the method (if defined in a C file via +:category:+)
3030 attr_accessor :section_title
3131
32- # Parameters for this method
33-
34- attr_accessor :params
35-
3632 ##
3733 # If true this method uses +super+ to call a superclass version
3834
@@ -43,8 +39,8 @@ class RDoc::AnyMethod < RDoc::MethodAttr
4339 ##
4440 # Creates a new AnyMethod with a token stream +text+ and +name+
4541
46- def initialize text , name
47- super
42+ def initialize ( text , name , singleton : false )
43+ super ( text , name , singleton : singleton )
4844
4945 @c_function = nil
5046 @dont_rename_initialize = false
@@ -56,11 +52,10 @@ def initialize text, name
5652 ##
5753 # Adds +an_alias+ as an alias for this method in +context+.
5854
59- def add_alias an_alias , context = nil
60- method = self . class . new an_alias . text , an_alias . new_name
55+ def add_alias ( an_alias , context = nil )
56+ method = self . class . new an_alias . text , an_alias . new_name , singleton : singleton
6157
6258 method . record_location an_alias . file
63- method . singleton = self . singleton
6459 method . params = self . params
6560 method . visibility = self . visibility
6661 method . comment = an_alias . comment
@@ -109,8 +104,8 @@ def call_seq
109104 #
110105 # See also #param_seq
111106
112- def call_seq = call_seq
113- return if call_seq . empty?
107+ def call_seq = ( call_seq )
108+ return if call_seq . nil? || call_seq . empty?
114109
115110 @call_seq = call_seq
116111 end
@@ -181,7 +176,7 @@ def marshal_dump
181176 # * #full_name
182177 # * #parent_name
183178
184- def marshal_load array
179+ def marshal_load ( array )
185180 initialize_visibility
186181
187182 @dont_rename_initialize = nil
@@ -198,7 +193,7 @@ def marshal_load array
198193 @full_name = array [ 2 ]
199194 @singleton = array [ 3 ]
200195 @visibility = array [ 4 ]
201- @comment = array [ 5 ]
196+ @comment = RDoc :: Comment . from_document array [ 5 ]
202197 @call_seq = array [ 6 ]
203198 @block_params = array [ 7 ]
204199 # 8 handled below
@@ -210,8 +205,8 @@ def marshal_load array
210205 @section_title = array [ 14 ]
211206 @is_alias_for = array [ 15 ]
212207
213- array [ 8 ] . each do |new_name , comment |
214- add_alias RDoc ::Alias . new ( nil , @name , new_name , comment , @singleton )
208+ array [ 8 ] . each do |new_name , document |
209+ add_alias RDoc ::Alias . new ( nil , @name , new_name , RDoc :: Comment . from_document ( document ) , singleton : @singleton )
215210 end
216211
217212 @parent_name ||= if @full_name =~ /#/ then
@@ -314,7 +309,7 @@ def skip_description?
314309 ##
315310 # Sets the store for this method and its referenced code objects.
316311
317- def store = store
312+ def store = ( store )
318313 super
319314
320315 @file = @store . add_file @file . full_name if @file
0 commit comments