mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rdoc/store.rb: Work around RDoc stores from older versions of
RDoc. * test/rdoc/test_rdoc_store.rb: Test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2e881bd59e
commit
69dfd5e034
3 changed files with 21 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
Tue Dec 18 16:38:51 2012 Eric Hodel <drbrain@segment7.net>
|
||||
|
||||
* lib/rdoc/store.rb: Work around RDoc stores from older versions of
|
||||
RDoc.
|
||||
* test/rdoc/test_rdoc_store.rb: Test for above.
|
||||
|
||||
Tue Dec 18 16:31:20 2012 Eric Hodel <drbrain@segment7.net>
|
||||
|
||||
* lib/rdoc/ruby_lex.rb: Return a TkHEREDOC instead of a TkSTRING when
|
||||
|
|
|
@ -354,6 +354,9 @@ class RDoc::Store
|
|||
loaded_mod = load_class_data name
|
||||
|
||||
file = loaded_mod.in_files.first
|
||||
|
||||
return unless file # legacy data source
|
||||
|
||||
file.store = self
|
||||
|
||||
mod = file.add_module RDoc::NormalModule, name
|
||||
|
|
|
@ -274,6 +274,18 @@ class TestRDocStore < XrefTestCase
|
|||
assert_includes @s.c_enclosure_classes, 'cObject'
|
||||
end
|
||||
|
||||
def test_find_c_enclosure_from_cache_legacy
|
||||
@klass.in_files.clear
|
||||
@s.save_class @klass
|
||||
@s.classes_hash.clear
|
||||
|
||||
assert_nil @s.find_c_enclosure 'cObject'
|
||||
|
||||
@s.c_enclosure_names['cObject'] = 'Object'
|
||||
|
||||
assert_nil @s.find_c_enclosure('cObject')
|
||||
end
|
||||
|
||||
def test_find_class_named
|
||||
assert_equal @c1, @store.find_class_named('C1')
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue