From 3148b96b425158c9de8d86df2b01d6bdd57b37a6 Mon Sep 17 00:00:00 2001 From: Earlopain <14981592+Earlopain@users.noreply.github.com> Date: Thu, 23 Jul 2026 20:26:42 +0200 Subject: [PATCH] Remove `ruby2_keywords` usage Ruby might deprecate this https://bugs.ruby-lang.org/issues/22205 This gem requires ruby 3.0 so we can simply use `...` to forward without using this legacy workaround --- lib/image_processing/chainable.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/image_processing/chainable.rb b/lib/image_processing/chainable.rb index 87e0da3..8f1d83e 100644 --- a/lib/image_processing/chainable.rb +++ b/lib/image_processing/chainable.rb @@ -98,13 +98,12 @@ def invalid_operation?(name) # Assume that any unknown method names an operation supported by the # processor. Add a bang ("!") if you want processing to be performed. - def method_missing(name, *args, &block) + def method_missing(name, ...) return super if name.to_s.end_with?("?") - return public_send(name.to_s.chomp("!"), *args, &block).call if name.to_s.end_with?("!") + return public_send(name.to_s.chomp("!"), ...).call if name.to_s.end_with?("!") - operation(name, *args, &block) + operation(name, ...) end - ruby2_keywords(:method_missing) if respond_to?(:ruby2_keywords, true) # Empty options which the builder starts with. DEFAULT_OPTIONS = {