Skip to content

Commit

Permalink
[ruby/rdoc] Avoid potentially loading the same extension from differe…
Browse files Browse the repository at this point in the history
…nt 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
```

ruby/rdoc@e47920d8f3
  • Loading branch information
deivid-rodriguez authored and matzbot committed Aug 19, 2024
1 parent cd0d4ec commit 786d000
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 786d000

Please sign in to comment.