summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris McClimans <chris@hippiehacker.org>2012-09-05 11:50:44 -0700
committerSteven Danna <steve@opscode.com>2013-01-23 22:37:36 -0800
commitcc5f1632a82a339d6339aec4cace463c243610b5 (patch)
tree642fec78d3a546e1e17210eb7a59cfd725e3c560
parent3f0b7378ac7ecca8b626b2664df93958c3abe711 (diff)
downloadchef-cc5f1632a82a339d6339aec4cace463c243610b5.tar.gz
CHEF-3068: please
-rw-r--r--chef/lib/chef/resource.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/chef/lib/chef/resource.rb b/chef/lib/chef/resource.rb
index bebb3a1d82..364be3732b 100644
--- a/chef/lib/chef/resource.rb
+++ b/chef/lib/chef/resource.rb
@@ -553,10 +553,10 @@ F
end
def defined_at
+ (file, line_no) = source_line.match(/(.*):(\d+)$/).matches
if cookbook_name && recipe_name && source_line
- "#{cookbook_name}::#{recipe_name} line #{source_line.split(':')[1]}"
+ "#{cookbook_name}::#{recipe_name} line #{line_no}"
elsif source_line
- file, line_no = source_line.split(':')
"#{file} line #{line_no}"
else
"dynamically defined"