diff options
Diffstat (limited to 'activerecord/lib/arel/nodes/extract.rb')
-rw-r--r-- | activerecord/lib/arel/nodes/extract.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/activerecord/lib/arel/nodes/extract.rb b/activerecord/lib/arel/nodes/extract.rb index fdf3004c6a..56069cd05a 100644 --- a/activerecord/lib/arel/nodes/extract.rb +++ b/activerecord/lib/arel/nodes/extract.rb @@ -1,10 +1,11 @@ # frozen_string_literal: true + module Arel module Nodes class Extract < Arel::Nodes::Unary attr_accessor :field - def initialize expr, field + def initialize(expr, field) super(expr) @field = field end @@ -13,7 +14,7 @@ module Arel super ^ @field.hash end - def eql? other + def eql?(other) super && self.field == other.field end |