-
Notifications
You must be signed in to change notification settings - Fork 139
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
"duplicated argument name" vs "repeated parameter name" #2287
Comments
I don't really like this error message from CRuby at all, but I'd rather not fight the backward compatibility fight. I'll change it to match. |
FWIW I've noticed there are quite a few messages different in Prism. I just filed this one because it was a lot of occurrences to change. |
@eregon do you think this is something we should try to push on? I do think it's a parameter and not an argument, but I don't want to push for too many changes all at the same time. |
I think anyway you will need to adapt many MRI tests so I think it's fine to have the more precise message here. The term parameter started to be used (much more) in Ruby around Ruby 2.7/3.0 as kwargs warnings used that term, so that's probably why the term argument was used in the first place. |
In terms of discussion on the CRuby tracker I think it makes more sense to discuss it once there is a good overview of the changes (or to use my link above but that's rather messy since it's a huge PR). In general Prism SyntaxError messages are much clearer, but in some cases it might be best to stay compatible if the existing message is not too confusing, something to discuss there. I wish gems wouldn't depend on exact exception messages but in practice they often do (a recent example: |
I just got to the point where this is now failing in the CRuby test suite, so this will be fixed soon. |
vs
I think either is fine, but if keeping
repeated parameter name
then there are quite a few occurrences to update in https://github.com/ruby/ruby/blob/master/test/ruby/test_syntax.rbThe text was updated successfully, but these errors were encountered: