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 arity check for keyword arguments #12

Merged
merged 2 commits into from
Oct 10, 2018

Conversation

dylanahsmith
Copy link
Contributor

Fixes #9

Previously keyword arguments were ignored, which prevented them from being passed in. This at least allows them to be passed in by treating them as a single optional or required argument. However, the code doesn't yet check that a hash is passed in for the keyword arguments or that the hash has the expected keys.

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.4%) to 29.844% when pulling bb32a20 on dylanahsmith:kwarg-arity-check into d8426d7 on ryanong:master.

@coveralls
Copy link

coveralls commented Oct 3, 2018

Coverage Status

Coverage increased (+0.2%) to 31.471% when pulling 2eae13e on dylanahsmith:kwarg-arity-check into d8426d7 on ryanong:master.

Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("2.0.0")
end

def required_keyword_args?
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would be willing to drop ruby 2.0.0 support to reduce code complexity

@ryanong
Copy link
Owner

ryanong commented Oct 3, 2018

looks like there are some failures on jruby.

If you don't want to fix those that is fine I'll try to fix it

Previously keyword arguments were ignored, which prevented them from
being passed in. This at least allows them to be passed in by treating
them as a single optional or required argument. However, it doesn't
yet check that a hash is passed in for the keyword arguments or that
the hash has the expected keys.
@dylanahsmith
Copy link
Contributor Author

For some reason I am not able to reproduce the jruby failures locally. However, it looks like the failures isn't happening after rebasing on top of #11

@dylanahsmith
Copy link
Contributor Author

ruby 2.0 support has been dropped to simplify the code and tests are passing. Are there any other concerns?

@ryanong
Copy link
Owner

ryanong commented Oct 10, 2018

Thanks for the contribution I'll make a push now or when I get home

@dylanahsmith dylanahsmith deleted the kwarg-arity-check branch October 10, 2018 18:45
@ryanong
Copy link
Owner

ryanong commented Oct 10, 2018

@dylanahsmith pushed!

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.

3 participants