diff options
| author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2021-08-04 08:43:07 +0200 |
|---|---|---|
| committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2021-08-31 19:06:14 +0900 |
| commit | a3b3fdc3cdff57a6ec6da703841b75a41edbe42c (patch) | |
| tree | 4e155bf584f61096d5f4ac804cc14653960c5a33 /lib | |
| parent | 8adc606271210acad490e93c47c3e1501407fb27 (diff) | |
[rubygems/rubygems] Take advantage of `target` being a `Pathname`
https://github.com/rubygems/rubygems/commit/c31b8cd232
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4789
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/bundler/cli/gem.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bundler/cli/gem.rb b/lib/bundler/cli/gem.rb index 43c3321053..a034aea324 100644 --- a/lib/bundler/cli/gem.rb +++ b/lib/bundler/cli/gem.rb @@ -185,7 +185,7 @@ module Bundler ) end - if File.exist?(target) && !File.directory?(target) + if target.exist? && !target.directory? Bundler.ui.error "Couldn't create a new gem named `#{gem_name}` because there's an existing file named `#{gem_name}`." exit Bundler::BundlerError.all_errors[Bundler::GenericSystemCallError] end |
