lib/gemirro/cache.rb in gemirro-1.2.0 vs lib/gemirro/cache.rb in gemirro-1.3.0

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + module Gemirro ## # The Cache class contains all method to store marshal informations # into files. # @@ -100,9 +102,10 @@ # # @return [Mixed] # def write(key_hash, value) return value if value.nil? || value.empty? + File.open(key_path(key_hash), 'wb') do |f| Marshal.dump(value, f) end value