You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
moduleModclassA# Some fn# @param arg [Object]deffn(arg)casearginSomeClass['array',v]'42'elsesuperendend# A nice little const.CONST=%i[abc]endend
Actual Output
Expected Output
And that was something I can achieve by:
Putting the const before the fn
moduleModclassA# A nice little const.CONST=%i[abc]# Some fn# @param arg [Object]deffn(arg)casearginSomeClass['array',v]'42'elsesuperendendendend
Avoiding %i notation:
moduleModclassA# Some fn# @param arg [Object]deffn(arg)casearginSomeClass['array',v]'42'elsesuperendend# A nice little const.CONST=[:a,:b,:c]endend
None of those solutions are actually acceptable in my case:
I cannot change the order of these particular things, because the deconstruction happens in a class different than that of the const, and I cannot extract the class to a separate file (I can —physically— of course, it's just that it doesn't make sense in my project).
I cannot avoid %i notation because the actual const is humongous (again, I physically can, but I would be violating the codebase coding style to please YARD).
Environment details:
OS: mac (M1) or Linux (ubuntu) … I don't think it matters
Ruby version (ruby -v): 3.3.1
YARD version (yard -v): 0.9.36
Relevant software dependency/versions:
none
The text was updated successfully, but these errors were encountered:
Description
YARD is losing control with deconstruction and array of symbols.
Steps to reproduce
This is the minimal reproduction for the issue.
Gemfile
:.yardopts
:src/main.rb
:Actual Output
Expected Output
And that was something I can achieve by:
%i
notation:None of those solutions are actually acceptable in my case:
%i
notation because the actual const is humongous (again, I physically can, but I would be violating the codebase coding style to please YARD).Environment details:
ruby -v
): 3.3.1yard -v
): 0.9.36The text was updated successfully, but these errors were encountered: