lib/rbbt/persist.rb in rbbt-util-5.14.21 vs lib/rbbt/persist.rb in rbbt-util-5.14.22
- old
+ new
@@ -309,9 +309,10 @@
end
def self.persist(name, type = nil, persist_options = {}, &block)
type ||= :marshal
+ persist_options ||= {}
return (persist_options[:repo] || Persist::MEMORY)[persist_options[:file]] ||= yield if type ==:memory and persist_options[:file] and persist_options[:persist] and persist_options[:persist] != :update
if FalseClass === persist_options[:persist]
yield
else