test/test_local_cache.rb in rubygems-update-0.8.4 vs test/test_local_cache.rb in rubygems-update-0.8.5
- old
+ new
@@ -136,11 +136,11 @@
def prep_cache_files(lc)
[ [lc.system_cache_file, 'sys'],
[lc.user_cache_file, 'usr'],
].each do |fn, data|
FileUtils.mkdir_p File.dirname(fn)
- open(fn, "w") { |f| f.puts({'key' => data}.to_yaml) }
+ open(fn, "w") { |f| f.puts(Marshal.dump({'key' => data})) }
end
end
def age_file(file_to_age, ref_file)
while File.stat(file_to_age).mtime <= File.stat(ref_file).mtime
@@ -148,10 +148,10 @@
FileUtils.touch(file_to_age)
end
end
def read_cache(fn)
- open(fn) { |f| YAML.load(f) }
+ open(fn) { |f| Marshal.load(f) }
end
end