なるようになるブログ

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

rails commit log流し読み(2022/09/12)

2022/09/12分のコミットです。

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

activerecord/CHANGELOG.md


Use explicit deprecator in AS::Deprecation tests

activesupport/test/deprecation_test.rbの修正です。

ActiveSupport::Deprecationのテストで、テスト内で固有のdeprecatorを使用するよう修正しています。top-levelのActiveSupport::Deprecation APIを削除しても良いのでは、という議論があり、その為の対応との事です。


Allow empty callstack in AS::Deprecation#warn

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

ActiveSupport::deprecation#warnに空のcallbackを指定出来るよう修正しています。


Clean up deprecation tests

activesupport/test/deprecation_test.rbの修正です。

ActiveSupport::Deprecationのテストで、テスト後にbehaviorの状態等を元に戻すよう修正しています。


Merge pull request #45997 from RubyElders/add-rack-deep-params

actionpack/lib/action_dispatch/http/request.rbの修正です。

ActionDispatch::RequestのHTTP request処理でrescueするエラークラスにRack::QueryParser::ParamsTooDeepErrorを追加しています。 Rack 2.2.4以降だと、paramsがlimit以上にnestしている場合に、Rack::QueryParser::ParamsTooDeepErrorをraiseするようになった為。


Merge pull request #45946 from st0012/error-reporter-doc

Rails guideに、Error Reporter機能について説明した、Error Reporting in Rails Applications guideを追加しています。


Move InternalMetadata to an independent object

Active Recordの修正です。

ActiveRecord::InternalMetadataActiveRecord::Baseの子クラスだったのを、ActiveRecord::Baseとの継承関係が無い独立したクラスに変更しています。何らかの理由でActiveRecord::InternalMetadata経由でconnectionを操作したい場合、ActiveRecord::InternalMetadataconnection attributeが追加されている為、その値経由で処理を行えるようになっています。