Skip to content

Commit

Permalink
Use non-deprecated APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
eregon committed Sep 29, 2019
1 parent d6a3286 commit e69a14c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion library/rubygems/gem/bin_path_spec.rb
Expand Up @@ -13,7 +13,14 @@

it "finds executables of default gems, which are the only files shipped for default gems" do
# For instance, Gem.bin_path("bundler", "bundle") is used by rails new
Gem::Specification.each_spec([Gem::Specification.default_specifications_dir]) do |spec|

if Gem.respond_to? :default_specifications_dir
default_specifications_dir = Gem.default_specifications_dir
else
default_specifications_dir = Gem::Specification.default_specifications_dir
end

Gem::Specification.each_spec([default_specifications_dir]) do |spec|
spec.executables.each do |exe|
path = Gem.bin_path(spec.name, exe)
File.exist?(path).should == true
Expand Down

0 comments on commit e69a14c

Please sign in to comment.