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の場合の考慮を削除する為。