Skip to content

Commit

Permalink
Fix: ruby#1269 gem server doesn't work because `Gem::Rdoc.load_rdoc…
Browse files Browse the repository at this point in the history
…` raise `NoMethodError`
  • Loading branch information
mterada1228 committed Jan 5, 2025
1 parent 57a4615 commit 4681de5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/rdoc/rubygems_hook.rb
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,10 @@ class RubygemsHook

attr_accessor :generate_rdoc, :generate_ri, :force

class << self
attr_accessor :rdoc_version
end

def self.default_gem?
!File.exist?(File.join(__dir__, "..", "rubygems_plugin.rb"))
end
Expand Down Expand Up @@ -310,5 +314,9 @@ def self.generation_hook installer, specs
# Generate document for compatibility if this is a default gem.
RubyGemsHook.generate(installer, specs)
end

def self.load_rdoc
@rdoc_version = RubyGemsHook.load_rdoc
end
end
end

0 comments on commit 4681de5

Please sign in to comment.