From 69460791ccdacef30eebb72c7a976f986292f48d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 11 Sep 2019 15:33:04 +0200 Subject: [PATCH] [rubygems/rubygems] Improve comment explaining the neccessity of `write_default_spec` method. The intention is not obvious from the commit log and it might avoid temptation to remove the method without further consideration. https://github.com/rubygems/rubygems/commit/8e17c50f64 --- lib/rubygems/installer.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb index 3b6c6e71f0..5aa6acf811 100644 --- a/lib/rubygems/installer.rb +++ b/lib/rubygems/installer.rb @@ -461,6 +461,9 @@ class Gem::Installer ## # Writes the full .gemspec specification (in Ruby) to the gem home's # specifications/default directory. + # + # In contrast to #write_spec, this keeps file lists, so the `gem contents` + # command works. def write_default_spec Gem.write_binary(default_spec_file, spec.to_ruby)