[ruby/rdoc] 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
```

https://github.com/ruby/rdoc/commit/e47920d8f3
This commit is contained in:
David Rodríguez 2024-08-19 13:02:14 +02:00 committed by git
parent cd0d4ec059
commit 786d000652

View File

@ -544,7 +544,7 @@ end
begin
require 'rubygems'
rdoc_extensions = Gem.find_files 'rdoc/discover'
rdoc_extensions = Gem.find_latest_files 'rdoc/discover'
rdoc_extensions.each do |extension|
begin