Do not allow mutation for empty clauses
This commit is contained in:
parent
f854b46aba
commit
bc02120392
|
@ -19,7 +19,7 @@ module ActiveRecord
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.empty
|
def self.empty
|
||||||
@empty ||= new(nil, nil)
|
@empty ||= new(nil, nil).freeze
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -83,7 +83,7 @@ module ActiveRecord
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.empty
|
def self.empty
|
||||||
@empty ||= new([])
|
@empty ||= new([]).tap(&:referenced_columns).freeze
|
||||||
end
|
end
|
||||||
|
|
||||||
def contradiction?
|
def contradiction?
|
||||||
|
|
Loading…
Reference in New Issue