summaryrefslogtreecommitdiffstats
path: root/lib/puppet/resource/reference.rb
diff options
context:
space:
mode:
authorMarkus Roberts <Markus@reality.com>2009-11-09 15:10:46 -0800
committerJames Turnbull <james@lovedthanlost.net>2009-11-12 21:18:59 +1100
commit3fdc8effbe25c9653d8bc86f2d4847984d4cb6f3 (patch)
tree562a8e07ac615b3eddf7a0afc1e350abd6d986a7 /lib/puppet/resource/reference.rb
parentb1722871ec27aa451be17e6fe6e099cc2f35cf7b (diff)
downloadpuppet-3fdc8effbe25c9653d8bc86f2d4847984d4cb6f3.tar.gz
puppet-3fdc8effbe25c9653d8bc86f2d4847984d4cb6f3.tar.xz
puppet-3fdc8effbe25c9653d8bc86f2d4847984d4cb6f3.zip
Ticket #2770 (deserializing Exec[...]s with "\n"s)
The resource reference logic wasn't handling resources with "\n"s in their namevars gracefully, and detection of this was complicated by infelicitous exception reporting. Note that this patch will require a merge when combined with the patch for #2657. Signed-off-by: Markus Roberts <Markus@reality.com>
Diffstat (limited to 'lib/puppet/resource/reference.rb')
-rw-r--r--lib/puppet/resource/reference.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/resource/reference.rb b/lib/puppet/resource/reference.rb
index c205f1038..37522ffe9 100644
--- a/lib/puppet/resource/reference.rb
+++ b/lib/puppet/resource/reference.rb
@@ -50,7 +50,7 @@ class Puppet::Resource::Reference
# If the title has square brackets, treat it like a reference and
# set things appropriately; else, just set it.
def title=(value)
- if value =~ /^([^\[\]]+)\[(.+)\]$/
+ if value =~ /^([^\[\]]+)\[(.+)\]$/m
self.type = $1
@title = $2
else