2021/05/03分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
activemodel/CHANGELOG.md
Fix and improve the method signature for try
and try!
activesupport/lib/active_support/core_ext/object/try.rb
の修正です。
try
メソッドとtry!
メソッドの引数名を適切な名前に修正しています。
Ensure association target classes exist
Active Recordの修正です。
singular associationに存在しないconstantが指定されていた場合に、readerメソッドを使用した際にexceptionをraiseするよう修正しています。collection associationは既にexceptionをraiseするようになっており、挙動を合わせる為。
activerecord/test/cases/base_test.rb
の修正です。
models/owner
のrequireが不足していたのを修正しています。
Fix isolated test failure in test/cases/adapters/mysql2/count_deleted_rows_with_lock_test.rb
activerecord/test/cases/adapters/mysql2/count_deleted_rows_with_lock_test.rb
の修正です。
models/car
のrequireが不足していたのを修正しています。
Refactor schema creation to extract new_foreign_key_definition
Active Recordの修正です。
schema作成時のforeign_key
の定義処理について、メソッド(new_foreign_key_definition
)に切り出すようリファクタリングしています。
Refactor schema creation to extract new_check_constraint_definition
Active Recordの修正です。
schema作成時のconstraint
の定義処理について、メソッド(new_check_constraint_definition
)に切り出すようリファクタリングしています。
Remove unused clear_association_cache
activerecord/lib/active_record/associations.rb
の修正です。
使用していないclear_association_cache
メソッドを削除しています。
Fix add_foreign_key
to prevent double prefix/suffix
activerecord/lib/active_record/migration.rb
の修正です。
add_foreign_key
メソッドでprefix/suffixが二重に指定されるようになってしまっていたのを修正しています。
Modify assert_storage_performance
to be quiet by default
activerecord/test/cases/encryption/performance/storage_performance_test.rb
の修正です。
assert_slower_by_at_most
メソッドと同様に、assert_storage_performance
メソッドについてもデフォルトでデバッグ情報は出力しないよう修正しています。
Cache and reuse generated attribute methods
Active Model、Active Recordの修正です。
attibute methodsをcacheして、既に生成済みのmethods再利用するよう修正しています。attibute methods生成に関するメモリ使用量を減らせるようにする為。
Deprecate implicitly coercing objects to string in ActiveSupport::SafeBuffer
activesupport/lib/active_support/core_ext/string/output_safety.rb
の修正です。
ActiveSupport::SafeBuffer
でto_str
が定義されていないオブジェクトへのStringの変換処理のサポートがdeprecateになりました。本来エラーにすべきようなオブジェクトまでStringに変換するようになっていて、結果予期せぬ結果が得られてしまう事がある為。