Skip to content

Commit e47920d

Browse files
deivid-rodriguezolleolleolle
authored andcommitted
Avoid potentially loading the same extension from different versions of the same gem
Avoids warnings like ``` /path/to/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rbs-3.4.0/lib/rdoc/discover.rb:10: warning: method redefined; discarding old scan /path/to/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rbs-3.5.1/lib/rdoc/discover.rb:10: warning: previous definition of scan was here ```
1 parent b8c2bcd commit e47920d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rdoc/rdoc.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ def remove_siginfo_handler
544544
begin
545545
require 'rubygems'
546546

547-
rdoc_extensions = Gem.find_files 'rdoc/discover'
547+
rdoc_extensions = Gem.find_latest_files 'rdoc/discover'
548548

549549
rdoc_extensions.each do |extension|
550550
begin

0 commit comments

Comments
 (0)