summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Roberts <Markus@reality.com>2010-05-13 13:08:46 -0700
committerMarkus Roberts <Markus@reality.com>2010-05-13 13:08:46 -0700
commit9d3e98b8cb2b980b61f3cd17af471f2e9d04841f (patch)
treedd8e4deb9cdce2026d8cb1501e476be4a2c1c340
parentd481340279ce21a26fb85ad3fe345a1ccfa7d5db (diff)
downloadpuppet-9d3e98b8cb2b980b61f3cd17af471f2e9d04841f.tar.gz
puppet-9d3e98b8cb2b980b61f3cd17af471f2e9d04841f.tar.xz
puppet-9d3e98b8cb2b980b61f3cd17af471f2e9d04841f.zip
Minimal footprint fix for #3751 (serialization 0.25.5 <-> 0.24.8)
The problem was caused by a conflict between our yaml post processing (which expects the malformed output of the standard library's yaml class) and zaml (which produces the right output). This patch implements the minimal footprint solution. It just causes zaml to always escape \r and \n, so that the fixups won't be triggered and the results will be properly interpreted by any version of puppet. For Rowlf, this patch should NOT be used, and instead the fix for #3766 (actually rooting out and removing the vestigial fixups) should be used. Signed-off-by: Markus Roberts <Markus@reality.com>
-rw-r--r--lib/puppet/util/zaml.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/util/zaml.rb b/lib/puppet/util/zaml.rb
index dcf0e1921..22045e138 100644
--- a/lib/puppet/util/zaml.rb
+++ b/lib/puppet/util/zaml.rb
@@ -234,7 +234,7 @@ class String
(self =~ /\s$/) or
(self =~ /^[>|][-+\d]*\s/i) or
(self[-1..-1] =~ /\s/) or
- (self =~ /[\x00-\x08\x0B\x0C\x0E-\x1F\x80-\xFF]/) or
+ (self =~ /[\x00-\x08\x0A-\x1F\x80-\xFF]/) or
(self =~ /[,\[\]\{\}\r\t]|:\s|\s#/) or
(self =~ /\A([-:?!#&*'"]|<<|%.+:.)/)
)