Skip to content
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

Fix broken negation example in documentation #112

Merged
merged 1 commit into from
Nov 20, 2024

Conversation

Drenmi
Copy link
Contributor

@Drenmi Drenmi commented May 3, 2024

What is this change?

The existing examples for negation when used verbatim result in the following error:

dry-logic-1.5.0/lib/dry/logic/builder.rb:48:in `instance_eval': wrong number of arguments (given 0, expected 1..3) (ArgumentError)

          instance_eval(&context)
                        ^^^^^^^^

From the error and the test cases it looks like this is intended to be invoked with a block.

This PR updates the documentation with a working example.

@timriley
Copy link
Member

Thanks @Drenmi!

@timriley timriley merged commit 402dd38 into dry-rb:main Nov 20, 2024
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants