MixinHandler
erroneously attaching module to root namespace
#1386
Labels
MixinHandler
erroneously attaching module to root namespace
#1386
Hi, I have a yard plugin, wherein one module is included in another, like so:
(this may be a suboptimal design, feedback welcome.)
This should register
YARDSorbet::StructClassHandler
's methods under theYARD::Handlers::Ruby::ClassHandler
namespace. Instead, what I'm finding is that the methods are instead registered on the top-level namespace.Poking around a bit, I think there might be an unhandled case in
YARD::Handlers::Ruby::MixinHandler#recipient
, where ifstatement[0].type
is a:const_path_ref
, the recipient should be a code object representingstatement[0]
, instead of the currentnamespace
.Let me know if that sounds right, and if you have any advice for resolution (I realize I can open up the
class
to resolve this specific case, but it still produces erroneous output for non-DSL usage).Update: I've written a workaround, so this is no longer visible in the online documentation, but can be repro'd by checking out at
209737c
and runningrake yard
.Thanks!
Steps to reproduce
Environment details:
ruby -v
): 2.7.2yard -v
): 0.9.26I have read the Contributing Guide.
The text was updated successfully, but these errors were encountered: