Given particular circumstances, YARD will not nest classes but create new top nodes.
The following conditions have to be met for the bug to occur:
For example with a class A and a class ::A::B, YARD will generate two top level entries, one for A and one for A::B.
Two example files can be found at https://gist.github.com/59e5f0be2e03dc9711b0
The same behaviour occurs when nesting classes in modules or vice versa, probably with all constants.
Handle creation of objects with complex object paths when path starts…
… with "::"