diff options
Diffstat (limited to 'lib/yaml/store.rb')
-rw-r--r-- | lib/yaml/store.rb | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/lib/yaml/store.rb b/lib/yaml/store.rb index 2ffa9554b9..e3a8e9fcdd 100644 --- a/lib/yaml/store.rb +++ b/lib/yaml/store.rb @@ -20,10 +20,24 @@ class YAML::Store < PStore end def load(content) - YAML::load(content) + table = YAML::load(content) + if table == false + {} + else + table + end + end + + def marshal_dump_supports_canonical_option? + false end - def load_file(file) - YAML::load(file) + EMPTY_MARSHAL_DATA = {}.to_yaml + EMPTY_MARSHAL_CHECKSUM = Digest::MD5.digest(EMPTY_MARSHAL_DATA) + def empty_marshal_data + EMPTY_MARSHAL_DATA + end + def empty_marshal_checksum + EMPTY_MARSHAL_CHECKSUM end end |