mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Don't mutate bind values in Relation
In order to better facilitate refactoring, most places that mutated `bind_values` have already been removed. One last spot snuck through. Since we're no longer mutating the array, it also does not need to be duped in `initialize_copy`.
This commit is contained in:
parent
08848a0035
commit
76d7d95790
2 changed files with 1 additions and 2 deletions
|
@ -33,7 +33,6 @@ module ActiveRecord
|
|||
# This method is a hot spot, so for now, use Hash[] to dup the hash.
|
||||
# https://bugs.ruby-lang.org/issues/7166
|
||||
@values = Hash[@values]
|
||||
@values[:bind] = @values[:bind].dup if @values.key? :bind
|
||||
reset
|
||||
end
|
||||
|
||||
|
|
|
@ -909,7 +909,7 @@ module ActiveRecord
|
|||
end
|
||||
end
|
||||
|
||||
bind_values.reject! { |col,_| col.name == target_value }
|
||||
self.bind_values = bind_values.reject { |col,_| col.name == target_value }
|
||||
end
|
||||
|
||||
def custom_join_ast(table, joins)
|
||||
|
|
Loading…
Reference in a new issue