From 7893dc9a910a3a0fdd3d2f478727468805fec177 Mon Sep 17 00:00:00 2001 From: hsbt Date: Mon, 28 Mar 2016 02:30:28 +0000 Subject: * lib/rubygems.rb: Fix `Gem.find_spec_for_exe` picks oldest gem. https://github.com/travis-ci/travis-ci/issues/5798 https://github.com/rubygems/rubygems/pull/1566 * test/rubygems/test_gem.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/rubygems.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/rubygems.rb b/lib/rubygems.rb index 8783756cd9..6b2016fd9b 100644 --- a/lib/rubygems.rb +++ b/lib/rubygems.rb @@ -254,7 +254,7 @@ module Gem spec.executables.include? exec_name } if exec_name - unless spec = specs.last + unless spec = specs.first msg = "can't find gem #{name} (#{requirements}) with executable #{exec_name}" raise Gem::GemNotFoundException, msg end -- cgit v1.2.3