なるようになるブログ

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

rails commit log流し読み(2019/08/27)

2019/08/27分のコミットです。

CHANGELOGにのったコミットは以下の通りです。

actionmailer/CHANGELOG.md

activesupport/CHANGELOG.md


Escape email addresses with name

actionmailer/lib/action_mailer/base.rbの修正です。

名前付きのemailを作成する為のemail_address_with_nameメソッドを追加しています・

email_address_with_name("sunny@example.org", "Sunny") #=> "Sunny <sunny@example.com>"

Add delete_multi method

activesupport/lib/active_support/cache.rbactivesupport/lib/active_support/cache/redis_cache_store.rbの修正です。

cacheから複数データをまとめて削除する為のdelete_multiメソッドを追加しています。


Reduce Hash creation in FormHelper

actionview/lib/action_view/helpers/form_helper.rbの修正です。

FormHelper#objectify_optionsmergeメソッドを使用するのを避けて、Hashオブジェクトの生成を減らすようにしています。


No need to count an Array because Array knows its length

activesupport/lib/active_support/core_ext/string/output_safety.rbの修正です。

SafeBuffer#[]=メソッドで引数の数を数えるのにcountを使用していたのをlengthを使用するよう修正し、不要なループが実行されないよう修正していmす。


Skip tidying bytes for ascii_only strings

activesupport/lib/active_support/multibyte/unicode.rbの修正です。

Unicode#tidy_bytesメソッドでStringがASCIIだけの場合不要な変換処理を行わないよう修正しています。


No need to dup && freeze an already frozen sql string

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

DatabaseStatements#to_sql_and_bindsメソッドでSQL Stringがfreezeな場合、不要なdup + freeze処理を実行しないよう修正しています。


Giving a Symbol here might be a very little bit efficient than giving a String

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

connection handlerを保持するスレッドローカル変数に使用するkeyをStringからSymbolに変更しています。keyは後の処理でSymbolに変更される為、最初からSymbolを使用した方が不要な変換が行われない為。


Fix rdoc of ActiveRecord::Associations::CollectionProxy#replace [ci skip]

activerecord/lib/active_record/associations/collection_proxy.rbのdocの修正です。

ActiveRecord::Associations::CollectionProxy#replaceメソッドのdoc内のexampleコードで、括弧が不足している箇所があったのを修正しています。


Fix assertion in test_delete_multi

activesupport/test/cache/behaviors/cache_store_behavior.rbの修正です。

delete_multiメソッドのテストでチェックするkey名に誤りがあったのを修正しています。


Ignore SQLite3 database files generated by parallel testing

gitignoreの対象にparallel testingで生成するSQLite3のDBファイル(sqlite3- + 数字)を追加しています。