summaryrefslogtreecommitdiff
path: root/lib/bundler/env.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2022-12-26 14:00:11 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2022-12-26 15:09:21 +0900
commitb7ad60a79440f65cf883d3ff9dbdde701666ef56 (patch)
treee0033b706a480377472bf93f58eaf42f6e2301ab /lib/bundler/env.rb
parent10c9ce9d4c632d7c6232b53367b0496aef2ebb13 (diff)
Merge RubyGems/Bundler master
from https://github.com/rubygems/rubygems/commit/72fd3dd2096af16d797ad0cd8e0d2a8869e240b3
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/7025
Diffstat (limited to 'lib/bundler/env.rb')
-rw-r--r--lib/bundler/env.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bundler/env.rb b/lib/bundler/env.rb
index 8b2e292fd6..7b1152930e 100644
--- a/lib/bundler/env.rb
+++ b/lib/bundler/env.rb
@@ -122,7 +122,7 @@ module Bundler
specs = Bundler.rubygems.find_name(name)
out << [" #{name}", "(#{specs.map(&:version).join(",")})"] unless specs.empty?
end
- if (exe = caller.last.split(":").first) && exe =~ %r{(exe|bin)/bundler?\z}
+ if (exe = caller.last.split(":").first)&.match? %r{(exe|bin)/bundler?\z}
shebang = File.read(exe).lines.first
shebang.sub!(/^#!\s*/, "")
unless shebang.start_with?(Gem.ruby, "/usr/bin/env ruby")