summaryrefslogtreecommitdiff
path: root/lib/bundler/installer/standalone.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2021-07-30 12:42:18 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-08-31 19:06:14 +0900
commit7465b94f8a4c2849498bf36b98be8da99c0504c2 (patch)
tree530af67ba8a12bb5a7e601ddef06dd0bdf30cd02 /lib/bundler/installer/standalone.rb
parent7566c85cc02b464e74860b01905e5d70136d77e5 (diff)
[rubygems/rubygems] Remove unnecessary `ruby_version` local variable
Under some case, this variable might not end up being used, in which case running the script would print unused variable warnings. https://github.com/rubygems/rubygems/commit/bf96030362
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4789
Diffstat (limited to 'lib/bundler/installer/standalone.rb')
-rw-r--r--lib/bundler/installer/standalone.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/bundler/installer/standalone.rb b/lib/bundler/installer/standalone.rb
index 2668ae0d16..4bd9b2e5ac 100644
--- a/lib/bundler/installer/standalone.rb
+++ b/lib/bundler/installer/standalone.rb
@@ -12,7 +12,6 @@ module Bundler
end
File.open File.join(bundler_path, "setup.rb"), "w" do |file|
file.puts "require 'rbconfig'"
- file.puts "ruby_version = RbConfig::CONFIG[\"ruby_version\"]"
file.puts reverse_rubygems_kernel_mixin
paths.each do |path|
file.puts %($:.unshift File.expand_path("\#{__dir__}/#{path}"))
@@ -26,7 +25,7 @@ module Bundler
@specs.map do |spec|
next if spec.name == "bundler"
Array(spec.require_paths).map do |path|
- gem_path(path, spec).sub(version_dir, '#{RUBY_ENGINE}/#{ruby_version}')
+ gem_path(path, spec).sub(version_dir, '#{RUBY_ENGINE}/#{RbConfig::CONFIG["ruby_version"]}')
# This is a static string intentionally. It's interpolated at a later time.
end
end.flatten.compact