aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems/installer.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/installer.rb')
-rw-r--r--lib/rubygems/installer.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb
index 2e7ccc731e..214652a241 100644
--- a/lib/rubygems/installer.rb
+++ b/lib/rubygems/installer.rb
@@ -346,7 +346,10 @@ class Gem::Installer
def write_spec
open spec_file, 'w' do |file|
+ spec.installed_by_version = Gem.rubygems_version
+
file.puts spec.to_ruby_for_cache
+
file.fsync rescue nil # for filesystems without fsync(2)
end
end