なるようになるブログ

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

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

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

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

activerecord/CHANGELOG.md

actionpack/CHANGELOG.md


Add tests for to_s(:inspect)

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

to_s:inspectを指定した場合のテストを追加しています。


Fix index creation to preserve comment in bulk change table on MySQL

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

MySQLでbulk change tableでindexを作成する際に、commentオプションに指定した値がindex作成時に無視されてしまうバグがあったのを修正しています


Refactor index creation to use index definition visitor

Active Recordの修正です。

indexの作成処理をindex定義用のvisitorで行うようリファクタリングしています。


Remove unused require "active_support/core_ext/kernel/singleton_class"

使用していないactive_support/core_ext/kernel/singleton_classのrequireを削除しています。


Active Record uses singleton class eval in tests

activerecord/test/cases/helper.rbの修正です。

active_support/core_ext/kernel/singleton_classのrequireを追加しています。テスト内でsingleton_classのclass_evalを使用している箇所があった為。


"core_ext/array" is not used in here, but used in others

require処理を、実際にそのrequireが必要なファイルで行うよう修正しています。


Callbacks tests also uses singleton class eval

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

active_support/core_ext/kernel/singleton_classのrequireを追加しています。テスト内でsingleton_classのclass_evalを使用している箇所があった為。


Remove unused require "active_support/core_ext/array/extract_options"

activesupport/lib/active_support/core_ext/class/attribute.rbactivesupport/lib/active_support/message_encryptor.rbの修正です。

使用していないactive_support/core_ext/array/extract_optionsのrequireを削除しています。


Eager generate relation methods if a method is on Kernel

activerecord/lib/active_record/scoping/named.rbの修正です。

Kernelにあるのと同じ名前のメソッドをrelationに定義した場合に、Kernel側のメソッドが呼ばれてしまうバグがあったのを修正しています。


Support ALGORITHM = INSTANT DDL option for index operations on MySQL

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

MySQLにindex operationsにALGORITHM = INSTANTのサポートを追加しています。


Don’t ignore X-Forwarded-For IPs with ports attached

actionpack/lib/action_dispatch/middleware/remote_ip.rbの修正です。

X-Forwarded-For headerの値にport番号まで含まれていた場合に、remote_ipが正しいIPを返さないバグがあったのを修正しています。


Clarify existing app behavior when being upgraded [ci skip]

rails guideのUpgrading Ruby on Railsnの修正です。

Active Storage assignment behavior changeの項の言い回しを修正しています。


Use index_algorith(...) instead of index_algorithms.fetch(...)

activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rbの修正です。

Hashから値を取得するのにfetch + blockでArgumentErrorをraiseしていたのを、メソッドを使用して値を取得するよう修正しています。


Fix incorrectly successful datetime precision tests

activerecord/test/cases/adapters/mysql2/datetime_precision_quoting_test.rbの修正です。

値にmicrosecond precisionが含まれない事を確認するassertionが、microsecond precisionが含まれる場合も通る内容になってしまっていたのを修正しています。合わせて、もうサポートしていないバージョンのMariaDBに関するテストの削除等を行っています。