summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Martin <max@puppetlabs.com>2011-04-26 11:51:21 -0700
committerMax Martin <max@puppetlabs.com>2011-04-26 11:51:21 -0700
commit439cf57cf3ccf8150bab4c3883e2b0e818f960a4 (patch)
tree0db9dc7cea499ba76d609be93e90219924961157
parent67a86554fff18cd75744ea987ea2361f495efc4c (diff)
parent6064e8e37b0d6f9996921bfa598d5401a1f98537 (diff)
downloadpuppet-439cf57cf3ccf8150bab4c3883e2b0e818f960a4.tar.gz
puppet-439cf57cf3ccf8150bab4c3883e2b0e818f960a4.tar.xz
puppet-439cf57cf3ccf8150bab4c3883e2b0e818f960a4.zip
Merge branch 'ticket/2.7.x/7101-template-compilation' into 2.7.x
* ticket/2.7.x/7101-template-compilation: (#7101) Fix template error messages in Ruby 1.8.5
-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