-
Kouhei Yanagita authored
`ActiveModel::AttributeAssignment#assign_attributes` checks if the argument responds to `each_pair`, and raises an exception if it does not. However, in `_assign_attributes`, the argument is enumerated using `each`. As a result, if the argument has `each_pair` but not `each`, this error check results in a false negative. (An example of such an object is `OpenStruct`.)
Kouhei Yanagita authored`ActiveModel::AttributeAssignment#assign_attributes` checks if the argument responds to `each_pair`, and raises an exception if it does not. However, in `_assign_attributes`, the argument is enumerated using `each`. As a result, if the argument has `each_pair` but not `each`, this error check results in a false negative. (An example of such an object is `OpenStruct`.)
Loading