lib/picky/backends/memory/basic.rb in picky-4.26.1 vs lib/picky/backends/memory/basic.rb in picky-4.26.2

- old
+ new

@@ -36,10 +36,19 @@ # The empty index that is used for putting the index # together before it is dumped into the files. # def empty - @empty && @empty.clone || {} + @empty && @empty.clone || empty_hash + end + + def empty_hash + # TODO Make this an explicit option. + if defined? GoogleHashSparseRubyToRuby + GoogleHashSparseRubyToRuby.new # TODO Use GoogleHashDenseIntToRuby where possible. + else + {} + end end # The initial content before loading from file. # def initial \ No newline at end of file