From 965bc3f417cd4efa508a594f6b2f02ec32209872 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Mon, 19 Aug 2024 13:02:14 +0200 Subject: [PATCH] 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 ``` --- lib/rdoc/rdoc.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rdoc/rdoc.rb b/lib/rdoc/rdoc.rb index e1b961b124..47108ceee3 100644 --- a/lib/rdoc/rdoc.rb +++ b/lib/rdoc/rdoc.rb @@ -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