aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/nodes/named_function.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/arel/nodes/named_function.rb')
-rw-r--r--lib/arel/nodes/named_function.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/arel/nodes/named_function.rb b/lib/arel/nodes/named_function.rb
index 56669bf858..c792f0af98 100644
--- a/lib/arel/nodes/named_function.rb
+++ b/lib/arel/nodes/named_function.rb
@@ -7,6 +7,15 @@ module Arel
super(expr, aliaz)
@name = name
end
+
+ def hash
+ super ^ @name.hash
+ end
+
+ def eql? other
+ super && self.name == other.name
+ end
+ alias :== :eql?
end
end
end