Project

General

Profile

« Previous | Next » 

Revision 01b39acd

Added by Ewoud Kohl van Wijngaarden over 2 years ago

Fixes #34141 - Make validators modern Ruby compatible

In old Ruby versions a hash was pushed as the last argument but in
modern Ruby there is first class support for this via kwargs. This
worked if a single argument was provided but if they were combined it
failed:

validate_presence :setting, if: ->(settings) { false }

This then tried to create a validator of a hash rather than as a
predicate. It then also unconditionally validates :setting.

  • added
  • modified
  • copied
  • renamed
  • deleted