summaryrefslogtreecommitdiff
path: root/lib/yaml/rubytypes.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-06-07 16:33:01 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-06-07 16:33:01 +0000
commitdb128e1b31f3c31e955a9063d027a97dcb938873 (patch)
tree8fae5a1140049d13043e01a4bd2c7358d2807a5d /lib/yaml/rubytypes.rb
parent3ec9537664b3555609bccd0bdf54fa25040a2aeb (diff)
* bignum.c (bignorm): fixed a bug in normalizing negative numbers
reported from Honda Hiroki <hhonda@ipflex.com>. normalizing should not trim preceding zeros from negative numbers. * ext/socket/socket.c (ruby_getaddrinfo__aix): merged a patch from KUBO Takehiro <kubo@jiubao.org> to support AIX. [ruby-list:40832] * lib/yaml/rubytypes.rb (Array::to_yaml): merged a patch from Tilman Sauerbeck <tilman@code-monkey.de>. [ruby-core:05055] * lib/yaml/rubytypes.rb (Hash::to_yaml): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 2a0c31d990..643b30b22c 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