summaryrefslogtreecommitdiff
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 ()
tree68dfd6268aaec3e70a953647e8b737d1e26aba4b
parent7fbb9078fe61104606a40e4e450a2cd1a33f8ca1 (diff)
* lib/rubygems.rb: Fix `Gem.find_spec_for_exe` picks oldest gem.
https://.com/travis-ci/travis-ci/issues/5798 https://.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
-rw-r--r--ChangeLog7
-rw-r--r--lib/rubygems.rb2
-rw-r--r--test/rubygems/test_gem.rb14
3 files changed, 22 insertions, 1 deletions
@@ -1,3 +1,10 @@
Mon Mar 28 11:26:31 2016 SHIBATA Hiroshi <[email protected]>
* lib/rubygems.rb, lib/rubygems/*, test/rubygems/*: Update rubygems-2.6.2.
@@ -254,7 +254,7 @@ module Gem
spec.executables.include? exec_name
} if exec_name
- unless spec = specs.last
msg = "can't find gem #{name} (#{requirements}) with executable #{exec_name}"
raise Gem::GemNotFoundException, msg
end
@@ -143,6 +143,20 @@ class TestGem < Gem::TestCase
assert_match 'a-1/bin/exec', Gem.bin_path('a', 'exec', '>= 0')
end
def test_self_bin_path_no_exec_name
e = assert_raises ArgumentError do
Gem.bin_path 'a'