なるようになるブログ

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

rails commit log流し読み(2019/05/01)

2019/05/01分のコミットです。

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


Remove dynamic_form gem references in guides

rails guideのRails Internationalization (I18n) APIの修正です。

ガイドからdynamic_form gemの説明を削除しています。もうメンテされておらず、Rails 4からは正常に動作しない為。


revert changes to monotonic times

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

ActiveSupport::Notifications::Fanoutで処理時間の計算にConcurrent.monotonic_timeを使うようになっていたのを、Time.nowに戻しています。

元々TimeインスタンスだったのがFloat(Concurrent.monotonic_timeの戻り値はFloat)になった事により、元々Timeインスタンスを期待していたアプリが動作しなくなった、Timeを返す事はドキュメントに記載していた挙動である、また、FloatTimeインスタンスに正しく変換する方法は無い、等の理由により修正されています。


any? should be delegated to the errors list

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

ActiveModel::Errors@errorsdelegateするメソッドにany?を追加しています。scaffoldで生成したコードがdeprecation warningが表示されずに動作するようにする為。


@controller may not be defined here, and if so, it causes a Ruby warning

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

ActionView::TestCase@controllerを参照する前にdefined?で定義されているかどうかチェックするよう修正しています。


Remove database specific sql statements from SQLCounter

Active Recordのテストの修正です。

SQLCounterでmetadataを取得するSQLを無視する為に、adapter毎に無視するSQLのstatementsを定義しそのSQLと一致するかをチェックしていたのを、SCHEMA引数が定義されているかどうかでチェックするよう修正しています。


Active Model release notes [ci skip]

rails guideのRuby on Rails 6.0 Release Notesの修正です。

Active Modelの変更点についてRelease Notesに記載しています。