lib/rbbt/persist.rb in rbbt-util-5.29.2 vs lib/rbbt/persist.rb in rbbt-util-5.29.4

- old
+ new

@@ -108,10 +108,12 @@ TRUE_STRINGS = Set.new ["true", "True", "TRUE", "t", "T", "1", "yes", "Yes", "YES", "y", "Y", "ON", "on"] unless defined? TRUE_STRINGS def self.load_file(path, type) begin case (type || :marshal).to_sym + when :path + path when :nil nil when :boolean TRUE_STRINGS.include? Open.read(path).chomp.strip when :annotations @@ -165,9 +167,11 @@ lockfile.unlock if lockfile and lockfile.locked? return end case (type || :marshal).to_sym + when :path + nil when :nil nil when :boolean Misc.sensiblewrite(path, content ? "true" : "false", :lock => lockfile) when :fwt