File tree 2 files changed +10
-10
lines changed
2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change
1
+ Sun Oct 2 11:28:09 2011 Aaron Patterson <aaron@tenderlovemaking.com>
2
+
3
+ * lib/yaml/store.rb: make initialize method signature match the
4
+ superclass signature.
5
+
1
6
Sun Oct 2 10:44:01 2011 Kazuki Tsujimoto <kazuki@callcc.net>
2
7
3
8
* io.c: fix documentation of ARGF.lineno=.
Original file line number Diff line number Diff line change @@ -46,20 +46,15 @@ class YAML::Store < PStore
46
46
#
47
47
# Options passed in through +yaml_opts+ will be used when converting the
48
48
# store to YAML via Hash#to_yaml().
49
- def initialize ( *o )
50
- @opt = { }
51
- if String === o . first
52
- super ( o . shift )
53
- end
54
- if o . last . is_a? Hash
55
- @opt . update ( o . pop )
56
- end
49
+ def initialize file_name , yaml_opts = { }
50
+ @opt = yaml_opts
51
+ super
57
52
end
58
53
59
54
# :stopdoc:
60
55
61
56
def dump ( table )
62
- @table . to_yaml ( @opt )
57
+ YAML . dump @table
63
58
end
64
59
65
60
def load ( content )
@@ -75,7 +70,7 @@ def marshal_dump_supports_canonical_option?
75
70
false
76
71
end
77
72
78
- EMPTY_MARSHAL_DATA = { } . to_yaml
73
+ EMPTY_MARSHAL_DATA = YAML . dump ( { } )
79
74
EMPTY_MARSHAL_CHECKSUM = Digest ::MD5 . digest ( EMPTY_MARSHAL_DATA )
80
75
def empty_marshal_data
81
76
EMPTY_MARSHAL_DATA
You can’t perform that action at this time.
0 commit comments