2018/01/22分のコミットです。
CHANGELOGへの追加はありませんでした。
bin/yarn: Pass through arguments with spaces
railties/lib/rails/generators/rails/app/templates/bin/yarn.ttの修正です。
bin/yarnでARGVを渡す際に強制的にスペースを入れるようになっていたのを、そのまま渡すよう修正しています。
- exec "yarnpkg #{ARGV.join(' ')}" + exec %w(yarnpkg) + ARGV
元のやりかただと、yarn run add-copyright "(c) 2017, 2018 MyCompany"のように、スペースを意図的に入れた引数が正しく渡せなかった為。
PERF: Recover changes_applied performance (#31698)
Active Record、Active Modelの修正です。
Active Record配下にあったAttributeクラス及びAttributeSetクラスをActive Modelに移動した、Move Attribute and AttributeSet to ActiveModelの対応の影響で、Active Record のobjectのsave処理の性能が劣化してしまっていたのを修正しています。
先の対応でDirty#changes_appliedメソッドでchangesメソッドを呼び出すよう修正されていたのですが、changesメソッドは遅い処理の為、その影響で性能劣化が発生してしまっていました。
changesメソッドは使用せず、mutation trackerによって管理されている値を使用するよう修正しています。
Use singular define_attribute_method
activemodel/lib/active_model/attributes.rbの修正です。
Attributes.attributeメソッドでメソッドを定義するのにdefine_attribute_methodsメソッドを使用していたのをdefine_attribute_methodメソッドを使用するよう修正しています。
定義するメソッドが一つだけの場合、define_attribute_methodで十分な為。
Pass desired driver to Redis client constructor rather than munging global config
activesupport/test/cache/stores/redis_cache_store_test.rbの修正です。
RedisCacheStoreにdriverを指定するのにグローバルコンフィグを使用していたのを、コンストラクタの引数に指定するよう修正しています。
Merge pull request #31710 from eugeneius/indestructible_through_record
activerecord/lib/active_record/associations/has_many_through_association.rbの修正です。
has_many through association + counter cacheを使用している場合に、association先のrecordをdestroyした場合に、destroyに失敗した場合(before_destroyで処理が停止された場合)もcounter cacheが更新されてしまっていたのを、更新されないよう修正しています。
Merge pull request #24964 from vipulnsward/true-false
activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rbの修正です。
SQLite3Adapterクラスの@active変数の初期値をnilからtrueに変更しています。
@active変数に格納される値をtrue/falseだけになるようにし、不要なnilの場合の考慮を削除する為。