From 2a9ee81a5abc396c83c5365a674cd2452a17cc0b Mon Sep 17 00:00:00 2001 From: James Mead Date: Sat, 11 Nov 2023 14:19:24 +0000 Subject: [PATCH] Avoid rubocop directive ending up in YARD docs 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. --- lib/mocha/mock.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/mocha/mock.rb b/lib/mocha/mock.rb index b448cfe00..315749ef7 100644 --- a/lib/mocha/mock.rb +++ b/lib/mocha/mock.rb @@ -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)