From 74d8a9cd4167a37ec79d2351b20343cfe245064b Mon Sep 17 00:00:00 2001 From: Issy Long Date: Thu, 14 Dec 2023 09:33:34 +0000 Subject: [PATCH] Fix `Style/ArgumentsForwarding` RuboCop offenses for Ruby 3.1 --- Library/Homebrew/options.rb | 4 ++-- Library/Homebrew/style.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Library/Homebrew/options.rb b/Library/Homebrew/options.rb index 17ff40168d38f..70e022eda2fa8 100644 --- a/Library/Homebrew/options.rb +++ b/Library/Homebrew/options.rb @@ -90,8 +90,8 @@ def freeze super end - def each(*args, &block) - @options.each(*args, &block) + def each(...) + @options.each(...) end def <<(other) diff --git a/Library/Homebrew/style.rb b/Library/Homebrew/style.rb index 8c025e08161a0..3688dfa6283ed 100644 --- a/Library/Homebrew/style.rb +++ b/Library/Homebrew/style.rb @@ -298,8 +298,8 @@ def for_path(path) @offenses.fetch(Pathname(path), []) end - def each(*args, &block) - @offenses.each(*args, &block) + def each(...) + @offenses.each(...) end end