yard
yard copied to clipboard
Undocumented codebase with own Object class outputs wrong return value
For undocumented gems, YARD would default the return value as Object
.
However, when the lib contains its own namespaced Object
class, and return value would be linked to that incorrect Object
class.
Steps to reproduce
This is the minimal reproduction for the issue. I've done my best to remove all extraneous code and unique environment state on my machine before providing these steps:
- Visit https://www.rubydoc.info/gems/iron_bank/3.1.1/IronBank/Queryable:find
Actual Output
Return value "Object" links to IronBank::Object
page
Expected Output
Return value "Object" should not be linked, since it should point to Ruby's native Object
.
Environment details:
- OS: Mac OS X
- Ruby version (
ruby -v
): 2.6.6 - YARD version (
yard -v
): 0.9.24
I have read the Contributing Guide.
FWIW, this is easily solved with --default-return ::Object
in your .yardopts
file. I think for YARD to implement this out of the box it would require some slightly nicer formatting for the overwhelmingly common case.