From 02c04b19c3dbd166a2358f53416e6a6a28a8d108 Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Thu, 13 Feb 2025 21:19:58 +0000 Subject: [PATCH 1/2] Remove AnyMethod#params as it's already inherited from MethodAttr --- lib/rdoc/code_object/any_method.rb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/rdoc/code_object/any_method.rb b/lib/rdoc/code_object/any_method.rb index 2a82b3e991..da2bedecca 100644 --- a/lib/rdoc/code_object/any_method.rb +++ b/lib/rdoc/code_object/any_method.rb @@ -29,10 +29,6 @@ class RDoc::AnyMethod < RDoc::MethodAttr # The section title of the method (if defined in a C file via +:category:+) attr_accessor :section_title - # Parameters for this method - - attr_accessor :params - ## # If true this method uses +super+ to call a superclass version From db46c5ec0aa69844a8ed8444ee416466bc80a127 Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Mon, 17 Feb 2025 12:26:40 +0000 Subject: [PATCH 2/2] Remove unnecessary `MethodAttr#param_seq` as it's always nil and not used - `MethodAttr` is a superclass of `AnyMethod` and `Attr` - `AnyMethod` defineds its own `param_seq` method so this is redundant for it - The only place that calls `param_seq` is in `Darkfish`'s class page, which only calls it on `AnyMethod` as `Attr` is rendered in a different section - It doesn't really make sense for attributes to have a param_seq anyway --- lib/rdoc/code_object/method_attr.rb | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lib/rdoc/code_object/method_attr.rb b/lib/rdoc/code_object/method_attr.rb index 263780f7c7..3327f38da9 100644 --- a/lib/rdoc/code_object/method_attr.rb +++ b/lib/rdoc/code_object/method_attr.rb @@ -63,12 +63,6 @@ class RDoc::MethodAttr < RDoc::CodeObject attr_reader :arglists - ## - # Pretty parameter list for this method - - attr_reader :param_seq - - ## # Creates a new MethodAttr from token stream +text+ and method or attribute # name +name+. @@ -91,7 +85,6 @@ def initialize text, name @arglists = nil @block_params = nil @call_seq = nil - @param_seq = nil @params = nil end