lib/pagy/shared_methods.rb in pagy-9.0.9 vs lib/pagy/shared_methods.rb in pagy-9.1.0

- old
+ new

@@ -7,11 +7,10 @@ # Validates and assign the passed vars: var must be present and value.to_i must be >= to min def assign_and_check(name_min) name_min.each do |name, min| raise VariableError.new(self, name, ">= #{min}", @vars[name]) \ - unless @vars[name]&.respond_to?(:to_i) && \ - instance_variable_set(:"@#{name}", @vars[name].to_i) >= min + unless @vars[name]&.respond_to?(:to_i) && instance_variable_set(:"@#{name}", @vars[name].to_i) >= min end end # Assign @limit (overridden by the gearbox extra) def assign_limit