lib/yard/code_objects/method_object.rb in yard-0.6.3 vs lib/yard/code_objects/method_object.rb in yard-0.6.4

- old
+ new

@@ -43,10 +43,11 @@ # Changes the scope of an object from :instance or :class # @param [Symbol] v the new scope def scope=(v) reregister = @scope ? true : false YARD::Registry.delete(self) if reregister + @path = nil @scope = v.to_sym YARD::Registry.register(self) if reregister end # Sets the visibility @@ -122,10 +123,10 @@ # Override path handling for instance methods in the root namespace # (they should still have a separator as a prefix). # @return [String] the path of a method def path - if !namespace || namespace.path == "" + @path ||= if !namespace || namespace.path == "" sep + super else super end end