summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
authorMax Martin <max@puppetlabs.com>2011-04-27 12:52:35 -0700
committerMax Martin <max@puppetlabs.com>2011-04-27 12:52:35 -0700
commita80ff1ad0d25cc7cfa98cd6f425e6230787950fb (patch)
tree7324e202c6595750be76ce3f33ed04c945f3df7e /lib/puppet
parent89e9a212e7c2426fa89f65e57a3d225a73ae0613 (diff)
parent9d2500e7169bc8eba58d9157db49586be24d6ded (diff)
downloadpuppet-a80ff1ad0d25cc7cfa98cd6f425e6230787950fb.tar.gz
puppet-a80ff1ad0d25cc7cfa98cd6f425e6230787950fb.tar.xz
puppet-a80ff1ad0d25cc7cfa98cd6f425e6230787950fb.zip
Merge branch 'ticket/master/7101-template-compilation'
* ticket/master/7101-template-compilation: (#7101) Fix template error messages in Ruby 1.8.5
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/parser/templatewrapper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/parser/templatewrapper.rb b/lib/puppet/parser/templatewrapper.rb
index 180a03dc9..27d75bf92 100644
--- a/lib/puppet/parser/templatewrapper.rb
+++ b/lib/puppet/parser/templatewrapper.rb
@@ -20,7 +20,7 @@ class Puppet::Parser::TemplateWrapper
def script_line
# find which line in the template (if any) we were called from
- caller.find { |l| l =~ /#{file}:/ }.first[/:(\d+):/,1]
+ (caller.find { |l| l =~ /#{file}:/ }||"")[/:(\d+):/,1]
end
# Should return true if a variable is defined, false if it is not