なるようになるブログ

読書感想文かrailsについてかrubyについてか

rails commit log流し読み(2019/06/21)

2019/06/21分のコミットです。

CHANGELOGへの追加はありませんでした。


Address test_statement_cache_with_in_clause failure due to nondeterministic sort order

activerecord/test/cases/bind_parameter_test.rbの修正です。

test_statement_cache_with_in_clause内、assertionで値を比較する際に、値をidでsortしてからチェックするよう修正しています。 sortを指定しないと結果が不定になる為。


Make ActionDispatch::Response#content_type behavior configurable

Action Pack、railtieの修正です。

Change ActionDispatch::Response#content_type returning Content-Type header as it isActionDispatch::Response#content_typeメソッドをContent Typeヘッダーをそのまま返すよう変更したのですが、この非互換の変更によりアップグレードに影響がある、というコメントがきた為、フラグ(action_dispatch.return_only_media_type_on_content_type)で挙動を変更出来るように修正しています。

action_dispatch.return_only_media_type_on_content_typeにfalseを指定した場合、Rails 5.1までと同じ結果がになるようになっています。デフォルトはfalse。


Also deduplicate schema cache data when using the init_with interface

activerecord/lib/active_record/connection_adapters/schema_cache.rbの修正です。

Merge pull request #35891 from Shopify/schema-cache-deduplicationで行った、schema cacheのオブジェクトを使い回すようにする対応を、init_withメソッドで生成するインスタンスについても同様に行うよう修正しています。