Cache: set :version when writing to file

This commit is contained in:
Josh Holtrop 2013-11-05 09:22:46 -05:00
parent 338a49ba9c
commit 65a5838605

View File

@ -67,12 +67,12 @@ module Rscons
end end
@cache[:targets] ||= {} @cache[:targets] ||= {}
@cache[:directories] ||= {} @cache[:directories] ||= {}
@cache[:version] ||= VERSION
@lookup_checksums = {} @lookup_checksums = {}
end end
# Write the cache to disk to be loaded next time. # Write the cache to disk to be loaded next time.
def write def write
@cache[:version] = VERSION
File.open(CACHE_FILE, 'w') do |fh| File.open(CACHE_FILE, 'w') do |fh|
fh.puts(YAML.dump(@cache)) fh.puts(YAML.dump(@cache))
end end