mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Do not allow mutation for empty clauses
This commit is contained in:
parent
f854b46aba
commit
bc02120392
2 changed files with 2 additions and 2 deletions
|
@ -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 a new issue