Skip to content

Commit 8966718

Browse files
committed
Strip prefix :: from superclass name
1 parent 01cbb99 commit 8966718

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/rdoc/parser/prism_ruby.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,7 @@ def add_module_or_class(module_name, start_line, end_line, is_class: false, supe
679679
superclass_full_path = resolve_constant_path(superclass_name)
680680
superclass = @store.find_class_or_module(superclass_full_path) if superclass_full_path
681681
superclass_full_path ||= superclass_name
682+
superclass_full_path = superclass_full_path.sub(/^::/, '')
682683
end
683684
# add_class should be done after resolving superclass
684685
mod = owner.classes_hash[name] || owner.add_class(RDoc::NormalClass, name, superclass_name || superclass_expr || '::Object')

0 commit comments

Comments
 (0)