-
-
Notifications
You must be signed in to change notification settings - Fork 399
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
YARD:: Parser:: Ruby:: Method Definition Node#parameters #1015
Comments
Sorry, forgot to mention that include_block_param ? params : params[0..-2] passes RSpec using 2.3.2 & 2.2.4. Haven't investigated further. |
If changing this line passes tests, there are probably no tests for this actual functionality. It would be worth adding tests (including ones that address the issue from #894) to see if your fix resolves them. |
To clarify, the fix for percent arrays does not fix #894. Still working on that, maybe I'll get back to it today. Re the tests, you'd probably zero right in on this one, but I'll have a look. I did a bit more work yesterday checking into #894, as I'd like to find some more failure cases (one's complement |
Closing out some old issues. Given the significant age of this, it would be best to re-open with new context if it's still relevant. |
See
https://github.com/lsegal/yard/blob/master/lib/yard/parser/ruby/ast_node.rb#L472
While investigating the issue with the -1 default value, came across the following code:
last line in method,
params[0...-1]
removes an item from both ends of the array.Hence, it seems that the line should be --
Maybe I've been staring at code for too long...
Environment details:
I have read the Contributing Guide.
The text was updated successfully, but these errors were encountered: