diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2021-07-30 12:27:11 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2021-08-31 19:06:14 +0900 |
commit | 1d6551a02da866dc82866736cb216ce22dbd39d0 (patch) | |
tree | 125e2441c90c62525e9cc89d2c31efe3f05a28b2 /lib | |
parent | 97c0d3fead87316c127235f91535068ce60d0fa2 (diff) | |
download | ruby-1d6551a02da866dc82866736cb216ce22dbd39d0.tar.gz |
[rubygems/rubygems] Remove unnecessary `path` local variable
We can use `__dir__` directly.
https://github.com/rubygems/rubygems/commit/0e6083ca94
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bundler/installer/standalone.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/bundler/installer/standalone.rb b/lib/bundler/installer/standalone.rb index 0dd1ef0903..10ccf7d281 100644 --- a/lib/bundler/installer/standalone.rb +++ b/lib/bundler/installer/standalone.rb @@ -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 |