diff options
author | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-10-02 02:29:27 +0000 |
---|---|---|
committer | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-10-02 02:29:27 +0000 |
commit | 9bb327f1329dbb875868b8a58fde516fcc7db5ef (patch) | |
tree | 0261e928bcf4d6335e61ff9cc8c57cdcdb56350a /lib/yaml/store.rb | |
parent | 02e4428ec537211c28ae053ceac2e3442437f463 (diff) |
* lib/yaml/store.rb: make initialize method signature match the
superclass signature.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/yaml/store.rb')
-rw-r--r-- | lib/yaml/store.rb | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/lib/yaml/store.rb b/lib/yaml/store.rb index 82d6ee1aaa..b0b580ba1a 100644 --- a/lib/yaml/store.rb +++ b/lib/yaml/store.rb @@ -46,20 +46,15 @@ class YAML::Store < PStore # # Options passed in through +yaml_opts+ will be used when converting the # store to YAML via Hash#to_yaml(). - def initialize( *o ) - @opt = {} - if String === o.first - super(o.shift) - end - if o.last.is_a? Hash - @opt.update(o.pop) - end + def initialize file_name, yaml_opts = {} + @opt = yaml_opts + super end # :stopdoc: def dump(table) - @table.to_yaml(@opt) + YAML.dump @table end def load(content) @@ -75,7 +70,7 @@ class YAML::Store < PStore false end - EMPTY_MARSHAL_DATA = {}.to_yaml + EMPTY_MARSHAL_DATA = YAML.dump({}) EMPTY_MARSHAL_CHECKSUM = Digest::MD5.digest(EMPTY_MARSHAL_DATA) def empty_marshal_data EMPTY_MARSHAL_DATA |