Skip to content

improved error message for "wrong number of arguments"#5491

Merged
enebo merged 2 commits intojruby:masterfrom
ahorek:args
Dec 3, 2018
Merged

improved error message for "wrong number of arguments"#5491
enebo merged 2 commits intojruby:masterfrom
ahorek:args

Conversation

@ahorek
Copy link
Contributor

@ahorek ahorek commented Dec 3, 2018

see #5475

@ahorek ahorek force-pushed the args branch 2 times, most recently from 7baf23b to 4712f3a Compare December 3, 2018 00:36
@headius
Copy link
Member

headius commented Dec 3, 2018

This should be squashed when merged. Let us know when you're satisfied 😀

@enebo
Copy link
Member

enebo commented Dec 3, 2018

@ahorek travis is pretty unhappy with some Enumerator arity errors. Perhaps something in this PR changed some arity checking?

@ahorek
Copy link
Contributor Author

ahorek commented Dec 3, 2018

yeah, there're still some cases that don't work as expected, I'll let you know when it's ready

@enebo
Copy link
Member

enebo commented Dec 3, 2018

@ahorek ok. Thanks for fixing this... It has been an annoyance that the format was old

@ahorek ahorek force-pushed the args branch 2 times, most recently from 602878a to 7ae5d71 Compare December 3, 2018 18:29
@ahorek ahorek changed the title WIP: improved error message for "wrong number of arguments" improved error message for "wrong number of arguments" Dec 3, 2018
@ahorek
Copy link
Contributor Author

ahorek commented Dec 3, 2018

@enebo @headius ready for review!

@enebo enebo added this to the JRuby 9.2.5.0 milestone Dec 3, 2018
@enebo enebo merged commit 05d0d93 into jruby:master Dec 3, 2018
@enebo
Copy link
Member

enebo commented Dec 3, 2018

@ahorek looks pretty straight-forward...just merged it

@headius
Copy link
Member

headius commented Mar 6, 2024

This appears to be breaking at least one spec that expects no method name in the message:

108)
Thread.each_caller_location doesn't accept positional and keyword arguments ERROR
Expected ArgumentError (wrong number of arguments (given 2, expected 0))
but got: ArgumentError (`each_caller_location': wrong number of arguments (given 2, expected 0))

We probably should just drop the method name.

headius added a commit that referenced this pull request Mar 6, 2024
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