2022/12/17分のコミットです。
CHANGELOGへの追加はありませんでした。
Update docs to encourage use of wrapper method
actionpack/lib/action_controller/metal/request_forgery_protection.rbのdocの修正です。
verificationをskipしたい場合のexampleで、verificationメソッドを使用するよう修正しています。
'string'[0, index] is faster and more eco-friendly than 'string'.split.first
actionpack/lib/action_dispatch/http/mime_type.rbの修正です。
Stringをsplitしてfirstで最初の値を取得していた箇所を、indexを取得して[0,index]を使用するよう修正しています。後者の方が高速な為。
Reduce formats call which creates extra Array objects per each call
actionpack/lib/action_controller/metal/head.rbの修正です。
formatsメソッドの呼び出しを減らすよう修正しています。メソッド呼び出し毎にArrayオブジェクトが生成されてしまい、それを避ける為。
Cut event.name String in more efficient way
activesupport/lib/active_support/subscriber.rbの修正です。
Stringをsplitしてfirstで最初の値を取得していた箇所を、indexを取得して[0,index]を使用するよう修正しています。
No need to reset_body where setting the body soon afterwards
actionpack/lib/action_controller/metal.rbの修正です。
不要な場合にreset_body!を実行しないよう修正しています。
activesupport/lib/active_support/subscriber.rbの修正です。
Rubocopの設定に違反している箇所があったのを修正しています。
Avoid returning "" which is not a valid MIME type
actionpack/lib/action_dispatch/http/mime_type.rbの修正です。
parseメソッドで不正なMIME typeが指定された場合に空配列が返す、という挙動を維持するよう修正しています。
Optimize for the majority case where HWIA#default takes only one arhument
activesupport/lib/active_support/hash_with_indifferent_access.rbの修正です。
HashWithIndifferentAccess#defaultの引数が1つだけだった場合に、不要なオブジェクト生成を減らすよう修正しています。
Optimize for the default case where TaggedLogger takes only one tag name
activesupport/lib/active_support/tagged_logging.rbの修正です。
TaggedLogger#taggedの引数が1つだけだった場合に、不要なオブジェクト生成を減らすよう修正しています。
Create an Array for the error message only when invalid value exists
actionview/lib/action_view/lookup_context.rbの修正です。
LookupContext#formats=でエラーメッセージ用のArrayの生成を必要な時のみ行うよう修正しています。
rubocopの設定に違反している箇所があったのを修正した、:cop:をRevertしています。この修正の元となった修正をRevetする為。
Revert "Reduce more Array object creations"
ipのfilter処理でオブジェクト生成数を減らすよう修正した、Reduce more Array object creationsをRevertしています。修正の中でメソッドを1つ消したのですが、そのメソッドがweb-consoleで使用されていた為。