2022/03/21分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Restores some colons for correct grammar
rails guideのAutoloading and Reloading Constants
の修正です。
グラマー、フォーマットの修正を行っています。
Reset current scopes in AR using an on_unload callback
Active Record、railtiesの修正です。
delegate_missing_to
でdelegateしたメソッド内で違うclassを参照している場合、classのreload時にエラーになってしまうバグがあったのを修正しています。
Add a couple of missing requires in AR
activerecord/lib/active_record/scoping.rb
の修正です。
不足していたrequreを追加しています。
Adds a section about the undocumented before_remove_const in the Classic to Zeitwerk HOWTO
rails guideのClassic to Zeitwerk HOWTO
の修正です。
Ruby 3.1で追加されたbefore_remove_const
と同様のことをZeitwerkでやる方法についての説明を追加しています
Revert "Add a couple of missing requires in AR"
不足していたrequreを追加した、Add a couple of missing requires in AR をRevertしています。autoloadされるファイルであり明示的なrequireは不要だった為、後ほどRevertされています。
Merge pull request #44730 from pixeltrix/restore-application-problem-content-type-after-tests
actionpack/test/dispatch/request/json_params_parsing_test.rb
の修正です。
テストの後処理でapplication/problem+json
の再登録処理が不足していたのを修正しています。
Merge pull request #44728 from pixeltrix/deprecate-preserve-timezones
activesupport/lib/active_support.rb
の修正です。
Ruby 2.4より前のDateTime#to_time
、Time#to_time
メソッドの挙動(timezoneの保持しない挙動)を維持する為のconfig(to_time_preserves_timezone
)をderepcatedにしています。 Railsのバージョンアップ時に挙動を壊さないようにする為の対応だったのですが、現在のRailsは2.7以上のみをサポートしており、古いRubyの挙動を保持する必要はもうないだろう、という事でdeprecateになっています。
Refactor offsets method to avoid race condition
actionpack/lib/action_dispatch/journey/path/pattern.rb
の修正です。
eager loadが実行されない環境で、ActionDispatch::Journey::Path::Pattern#offsets
メソッド内の変数のキャッシュ処理がrace conditionによりエラーになってしまう事があったのを修正しています。