{"action":"created","issue":{"url":"https://api.github.com/repos/cucumber/cucumber-ruby/issues/1292","repository_url":"https://api.github.com/repos/cucumber/cucumber-ruby","labels_url":"https://api.github.com/repos/cucumber/cucumber-ruby/issues/1292/labels{/name}","comments_url":"https://api.github.com/repos/cucumber/cucumber-ruby/issues/1292/comments","events_url":"https://api.github.com/repos/cucumber/cucumber-ruby/issues/1292/events","html_url":"https://github.com/cucumber/cucumber-ruby/issues/1292","id":316750477,"number":1292,"title":"cucumber-expressions wrong number of arguments (given 0, expected 1)","user":{"login":"langalex","id":2173,"avatar_url":"https://avatars0.githubusercontent.com/u/2173?v=4","gravatar_id":"","url":"https://api.github.com/users/langalex","html_url":"https://github.com/langalex","followers_url":"https://api.github.com/users/langalex/followers","following_url":"https://api.github.com/users/langalex/following{/other_user}","gists_url":"https://api.github.com/users/langalex/gists{/gist_id}","starred_url":"https://api.github.com/users/langalex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/langalex/subscriptions","organizations_url":"https://api.github.com/users/langalex/orgs","repos_url":"https://api.github.com/users/langalex/repos","events_url":"https://api.github.com/users/langalex/events{/privacy}","received_events_url":"https://api.github.com/users/langalex/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2018-04-23T10:22:42Z","updated_at":"2018-05-11T11:49:30Z","closed_at":null,"author_association":"NONE","body":"## Summary\r\n\r\nJust upgraded:\r\n\r\ncucumber (3.0.2 → 3.1.0)\r\ncucumber-core (3.0.0 → 3.1.0)\r\ncucumber-expressions (4.0.4 → 5.0.17)\r\ncucumber-tag_expressions (1.0.1 → 1.1.1)\r\ngherkin (4.1.3 → 5.0.0) \r\ncucumber-rails (1.5.0 → 1.6.0)\r\n\r\nand now I'm getting a `wrong number of arguments (given 0, expected 1) (ArgumentError)` in _cucumber-expressions_.\r\n\r\n## Expected Behavior\r\n\r\nThere should be no ArgumentError.\r\n\r\n## Current Behavior\r\n\r\nWhen 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'`.\r\n\r\nStacktrace:\r\n\r\n```\r\ncucumber-expressions-5.0.17/lib/cucumber/cucumber_expressions/parameter_type_registry.rb:17:in `block in initialize'\r\ncucumber-expressions-5.0.17/lib/cucumber/cucumber_expressions/parameter_type.rb:38:in `instance_exec'\r\ncucumber-expressions-5.0.17/lib/cucumber/cucumber_expressions/parameter_type.rb:38:in `transform'\r\ncucumber-expressions-5.0.17/lib/cucumber/cucumber_expressions/argument.rb:33:in `value'\r\ncucumber-3.1.0/lib/cucumber/step_match.rb:18:in `block in args'\r\ncucumber-3.1.0/lib/cucumber/step_match.rb:17:in `map'\r\ncucumber-3.1.0/lib/cucumber/step_match.rb:17:in `args'\r\ncucumber-3.1.0/lib/cucumber/step_match.rb:97:in `deep_clone_args'\r\ncucumber-3.1.0/lib/cucumber/step_match.rb:29:in `invoke'\r\ncucumber-3.1.0/lib/cucumber/step_match.rb:24:in `block in activate'\r\n...\r\n```\r\n\r\n\r\n## Possible Solution\r\n\r\nThe line causing the error looks like this:\r\n\r\n    define_parameter_type(ParameterType.new('int', INTEGER_REGEXPS, Integer, lambda {|s| s.to_i}, true, true))\r\n\r\nThe error comes from the arity of the `lambda` being one, but it's called in `paramter_type.rb:38` with no args: `self_obj.instance_exec(*group_values, &@transformer)` (`@transformer` is the lambda from above).\r\n\r\nI have no idea what's going on there, but there's already [another commit fixing the arity of other lambdas](https://github.com/cucumber/cucumber-expressions-ruby/commit/86025db8d2bc96b5f5f5bc290ed4ecb5640eeedc). Could this be connected?\r\n\r\n## Steps to Reproduce (for bugs)\r\n\r\n1. upgrade cucumber-expressions to 5.0.17\r\n2. run tests \r\n\r\nSorry 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.\r\n\r\n## Context & Motivation\r\n\r\nTests are broken.\r\n\r\n## Your Environment\r\n\r\n* Version used: cucumber-expressions 5.0.17, Ruby 2.3.6\r\n* Operating System and version: MacOS 10.13.4\r\n* Link to your project: -\r\n"},"comment":{"url":"https://api.github.com/repos/cucumber/cucumber-ruby/issues/comments/388341469","html_url":"https://github.com/cucumber/cucumber-ruby/issues/1292#issuecomment-388341469","issue_url":"https://api.github.com/repos/cucumber/cucumber-ruby/issues/1292","id":388341469,"user":{"login":"aslakhellesoy","id":1000,"avatar_url":"https://avatars3.githubusercontent.com/u/1000?v=4","gravatar_id":"","url":"https://api.github.com/users/aslakhellesoy","html_url":"https://github.com/aslakhellesoy","followers_url":"https://api.github.com/users/aslakhellesoy/followers","following_url":"https://api.github.com/users/aslakhellesoy/following{/other_user}","gists_url":"https://api.github.com/users/aslakhellesoy/gists{/gist_id}","starred_url":"https://api.github.com/users/aslakhellesoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aslakhellesoy/subscriptions","organizations_url":"https://api.github.com/users/aslakhellesoy/orgs","repos_url":"https://api.github.com/users/aslakhellesoy/repos","events_url":"https://api.github.com/users/aslakhellesoy/events{/privacy}","received_events_url":"https://api.github.com/users/aslakhellesoy/received_events","type":"User","site_admin":false},"created_at":"2018-05-11T11:49:30Z","updated_at":"2018-05-11T11:49:30Z","author_association":"CONTRIBUTOR","body":"Yes please"}}
{"actor":{"display_login":"aslakhellesoy"}}