From: Tilman Sauerbeck Date: 2005-05-20T03:38:00+09:00 Subject: [PATCH] Silly bug in 1.8's YAML --+QahgC5+KEYLbs62 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, Ruby 1.8's YAML will use the "new" method to instantiate objects, but it should use "allocate" instead. Otherwise, there might be trouble with new/initialize that take arguments. This is fixed in Ruby 1.9/Syck CVS, but I think it should go in 1.8, too. Regards, Tilman -- learn to quote: http://www.netmeister.org/news/learn2quote.html --+QahgC5+KEYLbs62 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="ruby-yaml_fix.diff" diff -aur ruby-1.8.3.orig/lib/yaml/rubytypes.rb ruby-1.8.3/lib/yaml/rubytypes.rb --- ruby-1.8.3.orig/lib/yaml/rubytypes.rb 2004-08-18 22:54:40.000000000 +0200 +++ ruby-1.8.3/lib/yaml/rubytypes.rb 2005-05-19 20:32:45.000000000 +0200 @@ -236,7 +236,7 @@ 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 --+QahgC5+KEYLbs62--