2019/02/23分のコミットです。
CHANGELOGへの追加はありませんでした。
[ci skip] Updated migration version to 6.0 in the getting started docs
rails guideのGetting Started with Rails
の修正です。
migrationファイルのバージョンを5.0
-> 6.0
に修正しています。
基本的にはguideのmigrationファイルのバージョン更新のPRは受け付けてないのですが、今回はGetting Started guideでの修正なのでマージしたとの事です。
Pass lookup context to the layout handlers
actionview/lib/action_view/layouts.rb
、
actionview/lib/action_view/renderer/template_renderer.rb
の修正です。
layout handlersのメソッドの引数にlookup_context
を追加しています。
lookup_context
の呼び出し回数を減らす為の対応を行っており、その一環との事です。
update callbacks skipping methods in guide [ci skip]
rails guideのActive Record Callbacks
の修正です。
Skipping Callbacks
の項にあるcallbackをskipするメソッドの一覧に誤りがあったのを修正しています。
Ensure that rendered templates always have a format
Action Viewの修正です。
元々format
を保持していなかったRenderedCollection::EmptyCollection
classでもformat
を保持するよう修正しています。
これにより、rendered templateが必ずformat
を保持する状態になり、処理の分岐を削除 + lookup_context
の呼び出しを減らせるようになっています。
Skip test_select_with_subquery_in_from_uses_original_table_name
on CI
activerecord/test/cases/relations_test.rb
の修正です。
Skip test_select_with_subquery_in_from_uses_original_table_name
on Buildkite as wellでBuildkite上でもtest_select_with_subquery_in_from_uses_original_table_name
が実行されないようにする為に、ENV["BUILDKITE"]
がある場合はテストをskipするようにしたのですが、それが期待通りに動作しなかった為、ENV["CI"]
を見るよう修正しています。
Make test_select_with_subquery_in_from_uses_original_table_name
work with old SQLite3
activerecord/test/cases/relations_test.rb
の修正です。
test_select_with_subquery_in_from_uses_original_table_name
がCIで通らなかったのは、古いSQLiteではsubquery flatteningにより正しいカラム名が取得出来ない、という問題があった為のようでした。
という訳で、subqueryにDISTINCT
を追加してsubquery flatteningが行われないようにして対応しています。
参考:The SQLite Query Optimizer Overview
Merge pull request #35374 from rails/cache-inline-templates
Action Viewの修正です。
developmentで、inline templatesのrener処理でメモリリークが発生してしまっていたのを修正しています。
通常のテンプレートと異なりinline templateはcompile後の状態でのキャッシュが行えず、処理を行う度に正しく解放されないオブジェクトが生成されてしまっていました。で、これを避ける為に、inline templateについてはfinalizerを定義しrender時に使用したメソッドを削除し、オブジェクトの解放が正しく行われるよう修正しています。
activesupport/activesupport.gemspec
の修正です。
Zeitwerk gemのバージョンを1.3.1に更新しています。