diff options
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | lib/rdoc.rb | 2 | ||||
-rw-r--r-- | lib/rdoc/constant.rb | 10 | ||||
-rw-r--r-- | lib/rdoc/parser.rb | 6 | ||||
-rw-r--r-- | test/rdoc/test_rdoc_parser.rb | 10 |
5 files changed, 26 insertions, 12 deletions
@@ -1,3 +1,13 @@ +Tue Dec 3 09:42:27 2013 Eric Hodel <drbrain@segment7.net> + + * lib/rdoc: Update to RDoc master 900de99. Changes include: + + Fixed documentation display of constants + + Fixed handling of unknown parsers + + * test/rdoc: ditto. + Mon Dec 2 22:30:10 2013 NAKAMURA Usaku <usa@ruby-lang.org> * hash.c (getenv): fixed test failures introduced by r43950. diff --git a/lib/rdoc.rb b/lib/rdoc.rb index 4fb0c3b881..02be64f232 100644 --- a/lib/rdoc.rb +++ b/lib/rdoc.rb @@ -64,7 +64,7 @@ module RDoc ## # RDoc version you are using - VERSION = '4.1.0.preview.2' + VERSION = '4.1.0.preview.3' ## # Method visibilities diff --git a/lib/rdoc/constant.rb b/lib/rdoc/constant.rb index 97985cbf99..48b32aaf98 100644 --- a/lib/rdoc/constant.rb +++ b/lib/rdoc/constant.rb @@ -63,15 +63,7 @@ class RDoc::Constant < RDoc::CodeObject # for a documented class or module. def documented? - return true if super - return false unless @is_alias_for - case @is_alias_for - when String then - found = @store.find_class_or_module @is_alias_for - return false unless found - @is_alias_for = found - end - @is_alias_for.documented? + super or is_alias_for && is_alias_for.documented? end ## diff --git a/lib/rdoc/parser.rb b/lib/rdoc/parser.rb index 5c6a0a8983..5572ba10a4 100644 --- a/lib/rdoc/parser.rb +++ b/lib/rdoc/parser.rb @@ -268,9 +268,11 @@ class RDoc::Parser markup = Regexp.escape markup - RDoc::Parser.parsers.find do |_, parser| + _, selected = RDoc::Parser.parsers.find do |_, parser| /^#{markup}$/i =~ parser.name.sub(/.*:/, '') - end.last + end + + selected end ## diff --git a/test/rdoc/test_rdoc_parser.rb b/test/rdoc/test_rdoc_parser.rb index b9bff9c327..cbc3dab9ea 100644 --- a/test/rdoc/test_rdoc_parser.rb +++ b/test/rdoc/test_rdoc_parser.rb @@ -292,6 +292,16 @@ class TestRDocParser < RDoc::TestCase assert_nil parser end + def test_class_use_markup_unknown + content = <<-CONTENT +# :markup: RDoc + CONTENT + + parser = @RP.use_markup content + + assert_nil parser + end + def test_initialize @RP.new @top_level, @fn, '', @options, nil |