lib/big_keeper/util/cache_operator.rb in bigkeeper-0.9.11 vs lib/big_keeper/util/cache_operator.rb in bigkeeper-0.9.12

- old
+ new

@@ -30,11 +30,11 @@ @cache_path = File.expand_path("#{path}/.bigkeeper") FileUtils.mkdir_p(@cache_path) unless File.exist?(@cache_path) if File.exist?("#{@cache_path}/module.cache") - file = File.open("#{@cache_path}/module.cache", 'r') + file = File.open("#{@cache_path}/module.cache", 'r', :encoding => 'UTF-8') @modules = JSON.load(file.read(), :encoding => 'UTF-8') file.close else @modules = {"git" => {"all" => [], "current" => []}, "path" => {"all" => [], "add" => [], "del" => [], "current" => []}} end @@ -108,10 +108,10 @@ @modules = {"git" => {"all" => [], "current" => []}, "path" => {"all" => [], "add" => [], "del" => [], "current" => []}} cache_modules end def cache_modules - file = File.new("#{@cache_path}/module.cache", 'w') + file = File.new("#{@cache_path}/module.cache", 'w', :encoding => 'UTF-8') file << @modules.to_json file.close end end end