- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Param names in ast v2 #17
Conversation
(fixes failures in dry-validation with each & schema)
curry_args = predicate.respond_to?(:arity) && predicate.arity != 0 ? args : [] | ||
if predicate.is_a?(Proc) | ||
predicate.curry[*curry_args] | ||
elsif predicate != nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks suspicious, a rule with a nil predicate means there's a bug in our code, we shouldn't have a guard like that
We've got to add specs to the rule compiler & update it to work with the new ast |
We made it 🎉 |
This updates the AST to include predicate argument names and is a much cleaner solution than #13.
@solnic your thoughts please?