[DRE-commits] [SCM] ruby-extlib.git branch, master, updated. debian/0.9.15-2-3-g598321d

Cédric Boutillier boutil at debian.org
Fri Jan 11 21:25:51 UTC 2013


The following commit has been merged in the master branch:
commit 9dd5d9e59e4722f39842b2c3169d488fe8f038f6
Author: Cédric Boutillier <boutil at debian.org>
Date:   Fri Jan 11 19:14:11 2013 +0100

    apply upstream commit 633974b2759d9b924657f3888473d5fd681538dd [CVE-2013-0156] 1/2

diff --git a/lib/extlib/hash.rb b/lib/extlib/hash.rb
index d95c4e3..14ee815 100644
--- a/lib/extlib/hash.rb
+++ b/lib/extlib/hash.rb
@@ -281,7 +281,6 @@ class REXMLUtilityNode
   self.typecasts["float"]         = lambda{|v| v.nil? ? nil : v.to_f}
   self.typecasts["symbol"]        = lambda{|v| v.to_sym}
   self.typecasts["string"]        = lambda{|v| v.to_s}
-  self.typecasts["yaml"]          = lambda{|v| v.nil? ? nil : YAML.load(v)}
   self.typecasts["base64Binary"]  = lambda{|v| v.unpack('m').first }
 
   self.available_typecasts = self.typecasts.keys
diff --git a/spec/hash_spec.rb b/spec/hash_spec.rb
index 725bae5..c7bde02 100644
--- a/spec/hash_spec.rb
+++ b/spec/hash_spec.rb
@@ -254,7 +254,7 @@ describe Hash, "from_xml" do
       'approved'   => nil,
       'written_on' => nil,
       'viewed_at'  => nil,
-      'content'    => nil,
+      'content'    => { 'type' => 'yaml' },
       'parent_id'  => nil
     }
     Hash.from_xml(topic_xml)["topic"].should == expected_topic_hash
@@ -292,7 +292,7 @@ describe Hash, "from_xml" do
       # Changed this line where the key is :message.  The yaml specifies this as a symbol, and who am I to change what you specify
       # The line in ActiveSupport is
       # 'content' => { 'message' => "Have a nice day", 1 => "should be an integer", "array" => [{ "should-have-dashes" => true, "should_have_underscores" => true }] },
-      'content' => { :message => "Have a nice day", 1 => "should be an integer", "array" => [{ "should-have-dashes" => true, "should_have_underscores" => true }] },
+      'content' => "--- \n1: should be an integer\n:message: Have a nice day\narray: \n- should-have-dashes: true\n  should_have_underscores: true\n",
       'author_email_address' => "david at loudthinking.com",
       'parent_id' => nil,
       'ad_revenue' => BigDecimal("1.50"),

-- 
ruby-extlib.git



More information about the Pkg-ruby-extras-commits mailing list