dry-rb / dry-logic

Predicate logic with rule composition
https://dry-rb.org/gems/dry-logic/
MIT License
179 stars 66 forks source link

Better support for negative arity #77

Closed flash-gordon closed 3 years ago

flash-gordon commented 3 years ago

Ruby 3 changed arity of procs made from symbols (because they are lambdas now). This revealed some logic issues (see what I did here). Thanks to this change I finally read the documentation on #arity and required improvements.

P.S. It seems that nobody uses arity < -1 for predicates

dry-bot commented 3 years ago

Codacy Here is an overview of what got changed by this pull request:


Coverage increased per file
===========================
+ lib/dry/logic/rule/interface.rb  4

Complexity decreasing per file
==============================
+ lib/dry/logic/rule/interface.rb  -1

See the complete overview on Codacy