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
Expected result: all three methods are documented; test2 gets a custom call-seq. Actual result: only test1 and test2 are documented; test2 is documented with apples (standard call-seq).
Similar to how rake's desc works, RDoc attaches a comment to the next documentable item it sees.
For the first example there's no comment present above test1, so I would expect test1 and test1= to be undocumented while test2 has has the custom call-seq. If there is an implied comment above test1, then only test1 should be documented.
Having one comment apply to two methods on the same line is something that is possible to implement, but it would make an already fairly messy parser even messier. Also, it is not a type of ruby I want to encourage people to write. I don't think I will add such a feature.
For the second example, Class2 should not be inside Class1.
RDoc is not handling ; properly, so I will fix this bug.
Fair enough, I generally agree with the behavior you described; however in the first example, test2 doesn't get the a custom call-seq like it should. I was suggesting that this might be the same bug as in the second example. I could be wrong though.
I know this is a fringe case (maybe a wontfix?), but: having multiple methods in a single line leads to... interesting results. An example:
Expected result: all three methods are documented;
test2
gets a custom call-seq.Actual result: only
test1
andtest2
are documented;test2
is documented withapples
(standard call-seq).Worse example:
Expected result: classes are documented separately
Actual result:
Class2
is erroneously documented asClass1::Class2
The text was updated successfully, but these errors were encountered: