mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[rubygems/rubygems] Remove unnecessary path
local variable
We can use `__dir__` directly.
0e6083ca94
This commit is contained in:
parent
97c0d3fead
commit
1d6551a02d
Notes:
git
2021-08-31 19:07:23 +09:00
2 changed files with 2 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue