Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/rdoc/servlet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def do_GET req, res
# +generator+ is used to create the page.

def documentation_page store, generator, path, req, res
text_name = path.sub /.html$/, ''
text_name = path.chomp '.html'
name = text_name.gsub '/', '::'

if klass = store.find_class_or_module(name) then
Expand Down
5 changes: 3 additions & 2 deletions test/rdoc/test_rdoc_rubygems_hook.rb
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,9 @@ def test_generate_configuration_rdoc_string
end

def test_generate_default_gem
@a.loaded_from =
File.join Gem::Specification.default_specifications_dir, 'a.gemspec'
klass =
(Gem.respond_to?(:default_specifications_dir) ? Gem : Gem::Specification)
@a.loaded_from = File.join klass.default_specifications_dir, 'a.gemspec'

@hook.generate

Expand Down
2 changes: 1 addition & 1 deletion test/rdoc/test_rdoc_servlet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def test_documentation_page_page_with_nesting

generator = @s.generator_for store

readme = store.add_file 'nesting/README.rdoc', parser: RDoc::Parser::Simple
store.add_file 'nesting/README.rdoc', parser: RDoc::Parser::Simple

@s.documentation_page store, generator, 'nesting/README_rdoc.html', @req, @res

Expand Down