From 786d0006524b0ca282a05593ca3dff3633890af7 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] [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 --- 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 @@ 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