diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2022-12-26 14:00:11 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2022-12-26 15:09:21 +0900 |
commit | b7ad60a79440f65cf883d3ff9dbdde701666ef56 (patch) | |
tree | e0033b706a480377472bf93f58eaf42f6e2301ab /lib/bundler/gem_helper.rb | |
parent | 10c9ce9d4c632d7c6232b53367b0496aef2ebb13 (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/gem_helper.rb')
-rw-r--r-- | lib/bundler/gem_helper.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/bundler/gem_helper.rb b/lib/bundler/gem_helper.rb index 0bbd2d9b75..dcf759cded 100644 --- a/lib/bundler/gem_helper.rb +++ b/lib/bundler/gem_helper.rb @@ -21,7 +21,7 @@ module Bundler def gemspec(&block) gemspec = instance.gemspec - block.call(gemspec) if block + block&.call(gemspec) gemspec end end @@ -152,8 +152,7 @@ module Bundler def gem_push_host env_rubygems_host = ENV["RUBYGEMS_HOST"] - env_rubygems_host = nil if - env_rubygems_host && env_rubygems_host.empty? + env_rubygems_host = nil if env_rubygems_host&.empty? allowed_push_host || env_rubygems_host || "rubygems.org" end @@ -218,7 +217,7 @@ module Bundler SharedHelpers.chdir(base) do outbuf = IO.popen(cmd, :err => [:child, :out], &:read) status = $? - block.call(outbuf) if status.success? && block + block&.call(outbuf) if status.success? [outbuf, status] end end |