Closed estum closed 1 year ago
In the first pair of commits of the PR there are a couple of shared examples and updates of the Dry::Logic::Builder's unit specs which reproduces a raised exception in scenarios like the following :
Dry::Logic::Builder.() { key?(:speed) }.to_ast # NoMethodError: # undefined method `name' for #<Proc:0x000000010c8982a0 (lambda)> # # predicate.name # ^^^^^
This is fixed by an avoiding of extra predicate to proc coercion in Dry::Logic::Builder::Context#initialize. So now it is just passed into the Dry::Logic::Builder::Context#predicate which lets to keep a predicate's name.
👀
@estum thank you!
In the first pair of commits of the PR there are a couple of shared examples and updates of the Dry::Logic::Builder's unit specs which reproduces a raised exception in scenarios like the following :
This is fixed by an avoiding of extra predicate to proc coercion in Dry::Logic::Builder::Context#initialize. So now it is just passed into the Dry::Logic::Builder::Context#predicate which lets to keep a predicate's name.