зеркало из https://github.com/github/ruby.git
[rubygems/rubygems] Remove unnecessary `path` local variable
We can use `__dir__` directly. https://github.com/rubygems/rubygems/commit/0e6083ca94
This commit is contained in:
Родитель
97c0d3fead
Коммит
1d6551a02d
|
@ -14,10 +14,9 @@ module Bundler
|
|||
file.puts "require 'rbconfig'"
|
||||
file.puts "ruby_engine = RUBY_ENGINE"
|
||||
file.puts "ruby_version = RbConfig::CONFIG[\"ruby_version\"]"
|
||||
file.puts "path = File.expand_path('..', __FILE__)"
|
||||
file.puts reverse_rubygems_kernel_mixin
|
||||
paths.each do |path|
|
||||
file.puts %($:.unshift File.expand_path("\#{path}/#{path}"))
|
||||
file.puts %($:.unshift File.expand_path("\#{__dir__}/#{path}"))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -159,7 +159,7 @@ RSpec.shared_examples "bundle install --standalone" do
|
|||
it "generates a bundle/bundler/setup.rb with the proper paths" do
|
||||
expected_path = bundled_app("bundle/bundler/setup.rb")
|
||||
extension_line = File.read(expected_path).each_line.find {|line| line.include? "/extensions/" }.strip
|
||||
expect(extension_line).to start_with '$:.unshift File.expand_path("#{path}/../#{ruby_engine}/#{ruby_version}/extensions/'
|
||||
expect(extension_line).to start_with '$:.unshift File.expand_path("#{__dir__}/../#{ruby_engine}/#{ruby_version}/extensions/'
|
||||
expect(extension_line).to end_with '/very_simple_binary-1.0")'
|
||||
end
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче