aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2013-05-20 15:29:10 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2013-05-20 15:29:10 -0700
commita1b72178714fbf0033fe076b7e51f57eff152bdd (patch)
tree98de620c699cb71b1f011a88365bd182d7fec37e /lib/arel
parent5b1d2d80d376bd0281febca853588b078b181af1 (diff)
downloadrails-a1b72178714fbf0033fe076b7e51f57eff152bdd.tar.gz
rails-a1b72178714fbf0033fe076b7e51f57eff152bdd.tar.bz2
rails-a1b72178714fbf0033fe076b7e51f57eff152bdd.zip
record who created the node when $DEBUG is true
Diffstat (limited to 'lib/arel')
-rw-r--r--lib/arel/nodes/node.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/arel/nodes/node.rb b/lib/arel/nodes/node.rb
index f10487ff6b..36e7628612 100644
--- a/lib/arel/nodes/node.rb
+++ b/lib/arel/nodes/node.rb
@@ -6,7 +6,14 @@ module Arel
include Arel::FactoryMethods
include Enumerable
- def initialize
+ if $DEBUG
+ def _caller
+ @caller
+ end
+
+ def initialize
+ @caller = caller.dup
+ end
end
###