Skip to content

Commit

Permalink
Avoid rubocop directive ending up in YARD docs
Browse files Browse the repository at this point in the history
It turns out that YARD displays a special section "Dynamic Method
Handling" for classes that implement `method_missing` even though this
method is tagged as private. The rubocop directive was getting caught up
in the YARD docs.
  • Loading branch information
floehopper committed Nov 11, 2023
1 parent 25ed0e5 commit 2a9ee81
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/mocha/mock.rb
Original file line number Diff line number Diff line change
Expand Up @@ -309,12 +309,10 @@ def all_expectations
end

# @private
# rubocop:disable Style/MethodMissingSuper
def method_missing(symbol, *arguments, &block)
def method_missing(symbol, *arguments, &block) # rubocop:disable Style/MethodMissingSuper
handle_method_call(symbol, arguments, block)
end
ruby2_keywords(:method_missing)
# rubocop:enable Style/MethodMissingSuper

# @private
def handle_method_call(symbol, arguments, block)
Expand Down

0 comments on commit 2a9ee81

Please sign in to comment.