mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Implicitly define classes in 'class <<ClassName' if we haven't come across them before
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3d9ba0390c
commit
ad27a14136
1 changed files with 5 additions and 1 deletions
|
@ -1733,7 +1733,11 @@ module RDoc
|
|||
if name == container.name
|
||||
parse_statements(container, SINGLE, &block)
|
||||
else
|
||||
other = TopLevel.find_class_named(name) || Context.new
|
||||
other = TopLevel.find_class_named(name)
|
||||
unless other
|
||||
other = @top_level.add_class(NormalClass, name, nil)
|
||||
other.record_location(@top_level)
|
||||
end
|
||||
parse_statements(other, SINGLE, &block)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue