From 47977c876b296e76fad3054c9fef9c00e18986c0 Mon Sep 17 00:00:00 2001 From: Nikita Shilnikov Date: Sat, 4 Jan 2025 14:43:43 +0100 Subject: [PATCH] Skip parameter to fix warnings Reported: https://bugs.ruby-lang.org/issues/21003 --- Gemfile.devtools | 1 + lib/dry/validation/macros.rb | 4 ++-- spec/spec_helper.rb | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Gemfile.devtools b/Gemfile.devtools index 87aa4d8f..7615effe 100644 --- a/Gemfile.devtools +++ b/Gemfile.devtools @@ -15,5 +15,6 @@ end group :tools do gem "rubocop", "~> 1.69.2" + gem "readline" gem "byebug" end diff --git a/lib/dry/validation/macros.rb b/lib/dry/validation/macros.rb index 0729e250..d36a9985 100644 --- a/lib/dry/validation/macros.rb +++ b/lib/dry/validation/macros.rb @@ -29,8 +29,8 @@ module Registrar # @see Macro # # @api public - def register_macro(name, ...) - macros.register(name, ...) + def register_macro(...) + macros.register(...) self end end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 7f113cdb..ddd01e7a 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -10,6 +10,8 @@ rescue LoadError end +Warning.process { |w| raise w } + require "yaml" require "i18n" require "dry/validation"