We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
headius
Learn more about funding links in repositories.
Report abuse
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
class Test def test_method a, b = 2, c = nil puts "Hello `#{a}`, `#{b}`, `#{c}`" end end args = ["a", 1, nil, nil] Test.new.test_method(*args, &args.pop)
Hello `a`, `1`, ``
.rb:2:in `test_method': wrong number of arguments (4 for 1..3) (ArgumentError)
Found in rubygems/test_utilities.rb:263
rubygems/test_utilities.rb:263
The text was updated successfully, but these errors were encountered:
Looks very similar to https://bugs.ruby-lang.org/issues/12860, cc @headius So I suppose the splat in the call should not duplicate the array then?
Sorry, something went wrong.
No branches or pull requests
Example
Expected Behavior
Actual Behavior
.rb:2:in `test_method': wrong number of arguments (4 for 1..3) (ArgumentError)
Found in
rubygems/test_utilities.rb:263
The text was updated successfully, but these errors were encountered: