なるようになるブログ

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

rails commit log流し読み(2018/09/08)

2018/09/08分のコミットです。

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

activesupport/CHANGELOG.md


Merge pull request #33615 from Larochelle/i18n_full_message_with_nested_attributes

activemodel/lib/active_model/errors.rbの修正です。

ActiveModel::Errors#full_messageメソッドでi18n用のkeyを生成する際に、[\d]を除去するよう修正しています

index_errorsにtrueを指定している場合に[\d](e.g. activemodel.attributes.person/contacts[0]/addresses[0].street)が含まれてしい、index_errorsを指定してない場合と同じi18nの値を取得出来るようにする為。


Merge pull request #33804 from yskkin/num_string

activemodel/lib/active_model/type/helpers/numeric.rbの修正です。

Numeric#non_numeric_string?の値が数値の文字列かどうかの正規表現に誤りがあり、FloatやDecimalの値を正しく判定出来てなかったバグがあったのを修正しています。


trace autoloads, and document hints for troubleshooting


Merge pull request #33615 from Larochelle/i18n_full_message_with_nested_attributes

activemodel/lib/active_model/errors.rbの修正です。

ActiveModel::Errors#full_messageメソッドでi18n用のkeyを生成する際に、[\d]を除去するよう修正しています

index_errorsにtrueを指定している場合に[\d](e.g. activemodel.attributes.person/contacts[0]/addresses[0].street)が含まれてしい、index_errorsを指定してない場合と同じi18nの値を取得出来るようにする為。


Merge pull request #33804 from yskkin/num_string

activemodel/lib/active_model/type/helpers/numeric.rbの修正です。

Numeric#non_numeric_string?の値が数値の文字列かどうかの正規表現に誤りがあり、FloatやDecimalの値を正しく判定出来てなかったバグがあったのを修正しています。


trace autoloads, and document hints for troubleshooting

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

Autoloadのtrace機能を追加しています。ActiveSupport::Dependencies.logger、及び、ActiveSupport::Dependencies.verboseを指定することが、Autoloadされたconstant及びそのconstantが定義されたファイルがlogに出力出来るようになっています。

ActiveSupport::Dependencies.logger = Rails.logger
ActiveSupport::Dependencies.verbose = true

User
autoloading: constant ApplicationRecord autoloaded from /rails/master/app/models/application_record.rb
autoloading: constant User autoloaded from /rails/master/app/models/user.rb

Don’t allocate array on no args

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

ActionView::Digestor.digestdependencies引数のデフォルト値を[]からnilに変更、及び、digestメソッドでdependenciesnilの場合に不要な処理を行わないよう修正しています。

不要なArrayの生成を減らせるようにする為。


reflect c03bba4 in CHANGELOGs

activesupport/CHANGELOG.mdguides/CHANGELOG.mdの修正です。

先のAutoloadのtrace機能の対応についてCHANGELOGにエントリーを追加しています。


supports_xxx? returns whether a feature is supported by the backend

Active Recordの修正です。

supports_advisory_locks?メソッドがconfigの値を返すようになっていたのを、使用しているbackendがadvisory lockを使用出来るかどうかを返すよう修正しています。