なるようになるブログ

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

rails commit log流し読み(2020/02/05)

2020/02/05分のコミットです。

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


Change all "can not"s to the correct "cannot"

各箇所のcan notcannotに修正しています。

どちらも綴りとしては間違えてないのですが、cannotの方が一般的な為。

参考: Cannot or Can Not?


Fix foreign_key_exists? in change_table to allow keyword arguments

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

change_table内のforeign_key_exists?でキーワード引数を使用出来るよう修正しています。


delegate allows multiple method names are passed

actionpack/lib/action_dispatch/testing/integration.rbの修正です。

複数メソッドdelegateするのに、メソッド毎にdelegateを使用していたのを、1つのdelegateで定義するよう修正しています。


Use string eval instead of define_method for integration session method delegation

actionpack/lib/action_dispatch/testing/integration.rbの修正です。

integration sessionのdelegate処理で、キーワード引数の警告の対応にキーワード引数が指定されているかどうかで対応していたのを、module_evalで引数の指定が異なる別のメソッドとして定義するよう修正しています。


Simplify lookup_store

activesupport/lib/active_support/cache.rbrailties/lib/rails/application/bootstrap.rbの修正です。

lookup_storeメソッドで、引数の分離をメソッド内で行っていたのを、メソッドの引数指定でstoreとparameterの指定をわけるようにして、引数の分離処理を行わずにすむよう修正しています。


Follow up fa986ae0cac423bf1ebcb5caeccbecf00c990094

actionpack/lib/abstract_controller/caching.rbの修正です。

先のlookup_storeの修正で、使用箇所の引数指定の修正が漏れていたのを修正しています。


Fix syntax error [ci skip]

rails guideのCaching with Rails: An Overviewの修正です。

Connection Pool Optionsの項にある、poolオプションの指定方法が誤っていたのを修正しています。


Fix with_options to allow string key options

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

Object#with_optionsにkeyがStringのoptionsを指定出来るよう修正しています。


Make translate helper takes keyword arguments the same with I18n.translate

actionpack/lib/abstract_controller/translation.rbactionview/lib/action_view/helpers/translation_helper.rbの修正です。

translate helper methodsでI18n.translateと同じキーワード引数が指定出来るよう修正しています。


Make localize helper takes keyword arguments the same with I18n.localize

actionpack/lib/abstract_controller/translation.rbactionview/lib/action_view/helpers/translation_helper.rbの修正です。

localize helper methodsでI18n.localizeと同じキーワード引数が指定出来るよう修正しています。


Prefer faster str.start_with? over str.first ==

String#first + ==で値をチェックした箇所を、String#start_with?を使用するよう修正しています。

String#start_with?の方が高速な為。