-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
cucumber-expressions wrong number of arguments (given 0, expected 1) #1292
Comments
Possibly related issue cucumber/common#375 - does it work with expressions 5.0.15? |
Yes, 5.0.15 works. |
@langalex I can't reproduce this when using the latest version of gem 'cucumber-ruby', git: 'git://github.com/cucumber/cucumber-ruby.git' |
with |
Brilliant, thanks for confirming that, @langalex! |
@xtrasimplicity thanks for putting in the time! |
Not a problem. I'll close this one off for the moment as it will be resolved with the release of 3.1.1. :) |
@xtrasimplicity - cucumber/common#380 isn't released yet, so I'm not sure the bug is fixed. @langalex can you provide us with a Minimal, Complete, and Verifiable example in a git repo please? We need that to reproduce the bug and verify that it's fixed. |
Thanks @aslakhellesoy. I've reopened this in the meantime. Did you want me to hold off on releasing |
Yes please |
@langalex |
@aslakhellesoy well, it does fail on travis. I ran |
also, it's still failing with |
I ran it on Ruby 2.5.1, where it passes. Then tried on 2.3.6, where it fails. This needs some more investigation. Thanks for the mcve @langalex - that will make it easier to fix. |
I experienced same issue (Ruby 2.4.4 and cucumber-expression 5.0.16, with 5.0.15 issue didn't happen). |
Thanks for investigating this, @alexbaranovskyi! |
I can confirm that v5.0.18 (from the source) works for me with the changes made in https://github.com/cucumber/cucumber/pull/380/files#diff-0035aaedf2d4a9c0687063ec6d379192, on Ruby 2.3.6, 2.4.3 and 2.5.0, with the CVE that @langalex posted. 👍 # Gemfile
gem 'cucumber-expressions', git: 'https://github.com/cucumber/cucumber', ref: '8ffca85', glob: 'cucumber-expressions/ruby/*.gemspec' |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs. |
I say this is fixed and can be closed. |
Thanks, @langalex! |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
Just upgraded:
cucumber (3.0.2 → 3.1.0)
cucumber-core (3.0.0 → 3.1.0)
cucumber-expressions (4.0.4 → 5.0.17)
cucumber-tag_expressions (1.0.1 → 1.1.1)
gherkin (4.1.3 → 5.0.0)
cucumber-rails (1.5.0 → 1.6.0)
and now I'm getting a
wrong number of arguments (given 0, expected 1) (ArgumentError)
in cucumber-expressions.Expected Behavior
There should be no ArgumentError.
Current Behavior
When running my tests, I get an ArgumentError in
cucumber-expressions-5.0.17/lib/cucumber/cucumber_expressions/parameter_type_registry.rb:17:in
block in initialize'`.Stacktrace:
Possible Solution
The line causing the error looks like this:
The error comes from the arity of the
lambda
being one, but it's called inparamter_type.rb:38
with no args:self_obj.instance_exec(*group_values, &@transformer)
(@transformer
is the lambda from above).I have no idea what's going on there, but there's already another commit fixing the arity of other lambdas. Could this be connected?
Steps to Reproduce (for bugs)
Sorry this is happening in a closed source repo. I can try to create a small test repo to expose the problem, but maybe it's a quick fix for someone who knows more about the code base.
Context & Motivation
Tests are broken.
Your Environment
The text was updated successfully, but these errors were encountered: