Remove unnecessary dup in ActiveModel::Serializer::Associations#associate

The `_reflections` are duped on `inherited` - no need to `dup` them
with each addition.
This commit is contained in:
Ben Woosley 2016-01-08 12:13:54 -08:00
parent 34e5faa1c4
commit 8ac1f107f4

View File

@ -76,8 +76,6 @@ module ActiveModel
# @api private
#
def associate(reflection)
self._reflections = _reflections.dup
self._reflections << reflection
end
end