summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
authorJames Turnbull <james@lovedthanlost.net>2008-10-21 09:50:54 +1100
committerJames Turnbull <james@lovedthanlost.net>2008-10-21 09:50:54 +1100
commit8a4e2e9378fe617b0d6b7210ed63f6d5e5bd9956 (patch)
tree158f9ed9a596661b94efa8539186ac9054e8e961 /lib/puppet
parente6f99f92ec5bfba973a3f13c629a8ce263a0da7d (diff)
downloadpuppet-8a4e2e9378fe617b0d6b7210ed63f6d5e5bd9956.tar.gz
puppet-8a4e2e9378fe617b0d6b7210ed63f6d5e5bd9956.tar.xz
puppet-8a4e2e9378fe617b0d6b7210ed63f6d5e5bd9956.zip
Fixed #1663 - Regression relating to facter fact naming from 0.24.5
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/parser/templatewrapper.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/puppet/parser/templatewrapper.rb b/lib/puppet/parser/templatewrapper.rb
index fc716b0fd..824fc48ef 100644
--- a/lib/puppet/parser/templatewrapper.rb
+++ b/lib/puppet/parser/templatewrapper.rb
@@ -78,7 +78,8 @@ class Puppet::Parser::TemplateWrapper
# to the regular methods.
benchmark(:debug, "Bound template variables for #{file}") do
scope.to_hash.each { |name, value|
- instance_variable_set("@#{name}", value)
+ realname = name.gsub(/[^\w]/, "_")
+ instance_variable_set("@#{realname}", value)
}
end