summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
authorJesse Wolfe <jes5199@gmail.com>2009-12-30 21:20:45 -0800
committerJames Turnbull <james@lovedthanlost.net>2010-01-01 11:45:44 +1100
commit13cbf043c6e16c14b0ab9fccd5738a8c9e5925b3 (patch)
treee2cef0d11711a7177146a9acd420ed4482ab7290 /lib/puppet
parent5c6f07b404e946266b33f08855116f7bb1a1800c (diff)
downloadpuppet-13cbf043c6e16c14b0ab9fccd5738a8c9e5925b3.tar.gz
puppet-13cbf043c6e16c14b0ab9fccd5738a8c9e5925b3.tar.xz
puppet-13cbf043c6e16c14b0ab9fccd5738a8c9e5925b3.zip
ReFix 2675 ending slash in directory should get stripped off
There was an intermittent bug in Puppet::Parser::Resource::Reference, during initialization, and object could sometimes have its title set before its type is set. This prevented the title from going through type-specific canonicalization. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/resource/reference.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/puppet/resource/reference.rb b/lib/puppet/resource/reference.rb
index dce4449de..eddb2d96b 100644
--- a/lib/puppet/resource/reference.rb
+++ b/lib/puppet/resource/reference.rb
@@ -50,6 +50,10 @@ class Puppet::Resource::Reference
# LAK:NOTE See http://snurl.com/21zf8 [groups_google_com]
x = @type = value.to_s.split("::").collect { |s| s.capitalize }.join("::")
end
+
+ if @title
+ self.title = @title
+ end
end
# Convert to the reference format that TransObject uses. Yay backward