summaryrefslogtreecommitdiff
path: root/lib/yaml/rubytypes.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/yaml/rubytypes.rb')
-rw-r--r--lib/yaml/rubytypes.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/yaml/rubytypes.rb b/lib/yaml/rubytypes.rb
index 2a0c31d..643b30b 100644
--- a/lib/yaml/rubytypes.rb
+++ b/lib/yaml/rubytypes.rb
@@ -77,7 +77,7 @@ hash_proc = Proc.new { |type, val|
elsif Hash === val
type, obj_class = YAML.read_type_class( type, Hash )
if obj_class != Hash
- o = obj_class.new
+ o = obj_class.allocate
o.update( val )
val = o
end
@@ -236,7 +236,7 @@ array_proc = Proc.new { |type, val|
if Array === val
type, obj_class = YAML.read_type_class( type, Array )
if obj_class != Array
- o = obj_class.new
+ o = obj_class.allocate
o.concat( val )
val = o
end