[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. 0.25.5-639-g8f94f35

test branch puppet-dev at googlegroups.com
Wed Jul 14 10:34:08 UTC 2010


The following commit has been merged in the upstream branch:
commit 58a3d27f30731af6c28eebc53f85997a060edf05
Author: Markus Roberts <Markus at reality.com>
Date:   Mon Jun 7 13:53:14 2010 -0700

    Fix for #3949 and related
    
    Syck/Yaml quietly passes on undefined classes as strings, so that if objects
    of those classes are loaded and re-serialized they passthrough unmodified.
    While not technically correct, it's still the POLS behavior, and we now support
    it.

diff --git a/lib/puppet/util/zaml.rb b/lib/puppet/util/zaml.rb
index dcf0e19..b0e22a3 100644
--- a/lib/puppet/util/zaml.rb
+++ b/lib/puppet/util/zaml.rb
@@ -121,7 +121,8 @@ class Object
         instance_variables.sort        # Default YAML behavior
     end
     def zamlized_class_name(root)
-        "!ruby/#{root.name.downcase}#{self.class == root ? '' : ":#{self.class.name}"}"
+        cls = self.class
+        "!ruby/#{root.name.downcase}#{cls == root ? '' : ":#{cls.respond_to?(:name) ? cls.name : cls}"}"
     end
     def to_zaml(z)
         z.first_time_only(self) {
@@ -231,7 +232,7 @@ class String
               when (
                     (self =~ /\A(true|false|yes|no|on|null|off|#{num}(:#{num})*|!|=|~)$/i) or 
                     (self =~ /\A\n* /) or
-                    (self =~ /\s$/) or
+                    (self =~ /[\s:]$/) or
                     (self =~ /^[>|][-+\d]*\s/i) or
                     (self[-1..-1] =~ /\s/) or 
                     (self =~ /[\x00-\x08\x0B\x0C\x0E-\x1F\x80-\xFF]/) or

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list