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 keyword arguments #34

Closed
wants to merge 1 commit into from
Closed

Fix keyword arguments #34

wants to merge 1 commit into from

Conversation

snwfog
Copy link

@snwfog snwfog commented Feb 8, 2019

Attempt to fix #33

If there is only an item, this case is valid, else raise exception for missing argument.
Elsif both block && value are present, raise exception for having too many arguments.
Elsif both block && value are missing, this is valid case.
Else either block and value are present, this is a valid case.

Also, the spec works even if the loaded values is nil doesn't seems to be valid, because User.where returns empty array, so the loader block is never called. This seems to be the reason why this bug got slipped.

@ghost
Copy link

ghost commented Feb 22, 2019

This PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@ghost ghost added the stale Inactive label Feb 22, 2019
@ghost ghost closed this Mar 1, 2019
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Inactive
Projects
None yet
Development

Successfully merging this pull request may close these issues.

__loader method proc kwargs behaves differently on rb 2.1.0 vs 2.4.0
1 participant