[rubygems/rubygems] Remove unnecessary condition

This variable can't be falsy.

https://github.com/rubygems/rubygems/commit/b838f9a6f0
This commit is contained in:
David Rodríguez 2022-06-15 10:14:23 +02:00 committed by git
parent 5a385677f3
commit 1aaeff8e36
2 changed files with 20 additions and 24 deletions

View File

@ -263,7 +263,6 @@ class Gem::Ext::CargoBuilder < Gem::Ext::Builder
# Details: https://github.com/rubygems/rubygems/issues/977#issuecomment-171544940
tmp_dest_relative = get_relative_path(tmp_dest.clone, extension_dir)
if tmp_dest_relative
full_tmp_dest = File.join(extension_dir, tmp_dest_relative)
# TODO: remove in RubyGems 3
@ -276,7 +275,6 @@ class Gem::Ext::CargoBuilder < Gem::Ext::Builder
destent = ent.class.new(dest_path, ent.rel)
destent.exist? || FileUtils.mv(ent.path, destent.path)
end
end
ensure
FileUtils.rm_rf tmp_dest if tmp_dest
end

View File

@ -61,7 +61,6 @@ class Gem::Ext::ExtConfBuilder < Gem::Ext::Builder
make dest_path, results, extension_dir
if tmp_dest_relative
full_tmp_dest = File.join(extension_dir, tmp_dest_relative)
# TODO remove in RubyGems 3
@ -76,7 +75,6 @@ class Gem::Ext::ExtConfBuilder < Gem::Ext::Builder
destent = ent.class.new(dest_path, ent.rel)
destent.exist? or FileUtils.mv(ent.path, destent.path)
end
end
ensure
ENV["DESTDIR"] = destdir
siteconf.close!