Skip to content

Commit

Permalink
Avoid potentially loading the same extension from different versions …
Browse files Browse the repository at this point in the history
…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
```
  • Loading branch information
deivid-rodriguez authored and olleolleolle committed Aug 19, 2024
1 parent b8c2bcd commit e47920d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rdoc/rdoc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ def remove_siginfo_handler
begin
require 'rubygems'

rdoc_extensions = Gem.find_files 'rdoc/discover'
rdoc_extensions = Gem.find_latest_files 'rdoc/discover'

rdoc_extensions.each do |extension|
begin
Expand Down

0 comments on commit e47920d

Please sign in to comment.