aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-28 02:30:28 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-28 02:30:28 +0000
commit64ce7711c0c428531ae09472c85df85cd3d1b603 (patch)
tree68dfd6268aaec3e70a953647e8b737d1e26aba4b /lib
parent7fbb9078fe61104606a40e4e450a2cd1a33f8ca1 (diff)
downloadruby-64ce7711c0c428531ae09472c85df85cd3d1b603.tar.gz
* 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
Diffstat (limited to 'lib')
-rw-r--r--lib/rubygems.rb2
1 files changed, 1 insertions, 1 deletions
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