Please sign in to comment.
Freeze association foreign keys to reduce allocations
The string returned here will ultimately get used as a key of a hash in the attribute set once the attributes are being built. When you give a non-frozen string to `Hash#`, it will be duped. Be freezing we can significantly reduce the number of times we end up allocating `"user_id"` This does not include any additional tests, as this should not have any public facing implications. If you are mutating the result of `Reflection#foreign_key`, please stop.
- Loading branch information...
Showing with 1 addition and 1 deletion.