From 735d91f43d3b1082effe4253300a1903e679f467 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Thu, 12 Dec 2013 14:16:43 -0600 Subject: Report correct file/line in backtraces for attr_rw methods --- Library/Homebrew/extend/module.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/extend/module.rb b/Library/Homebrew/extend/module.rb index 9210793f6..045508fd1 100644 --- a/Library/Homebrew/extend/module.rb +++ b/Library/Homebrew/extend/module.rb @@ -1,7 +1,10 @@ class Module def attr_rw(*attrs) + file, line, _ = caller.first.split(":") + line = line.to_i + attrs.each do |attr| - module_eval <<-EOS, __FILE__, __LINE__ + 1 + module_eval <<-EOS, file, line def #{attr}(val=nil) val.nil? ? @#{attr} : @#{attr} = val end -- cgit v1.2.3 'this.form.submit();'>
aboutsummaryrefslogtreecommitdiffstats
path: root/example/index.html
blob: 12f88cccd9f05fe272d7e20b48d3cfae8d1fcd82 (plain)
1
2
3
4
5
6
7
8
9
10
11