2018/12/21分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Remove remaining tests for Hash#transform_keys
and Hash#transform_keys!
activesupport/test/core_ext/hash_ext_test.rb
の修正です。
Use native Array#append
, Array#prepend
, Hash#transform_keys
, and Hash#transform_keys!
で削除したHas#transform_keys
、Hash#transform_keys!
メソッドに関するテストが残っていたのを削除しています。
Module#{define_method,alias_method,undef_method,remove_method} become public since Ruby 2.5
Module#define_method
、Module#alias_method
、Module#undef_method
、Module#remove_method
を使用するのにsend
を使用していたのを、メソッドを直接呼び出すよう修正しています。Ruby 2.5からpublicメソッドになった為。
Require Ruby 2.5 for Rails 6.のフォローアップとして、先の対応で対応されたメソッドをguideから削除、関連するテストを削除等を行っています。
Module#{attr,attr_accessor,attr_reader,attr_writer} become public since Ruby 2.5
Module#attr
、Module#attr_accessor
、Module#attr_reader
、Module#attr_writer
を使用するのにsend
を使用していたのを、メソッドを直接呼び出すよう修正しています。Ruby 2.5からpublicメソッドになった為。
Enable Style/RedundantBegin
cop to avoid newly adding redundant begin block
Layout/SpaceAfterSemicolon
copを追加、及び、各ファイルにcopを適応しています。
Ruby 2.5からdo / end block内でもrescue / else /ensureがbegin無しで書けるようになっている為、不要になったbeginが大量に削除されています。
Fix integer regex deprecation warnings for Ruby 2.6.0 (#34728)
actionview/lib/action_view/helpers/text_helper.rb
、
actionview/test/template/form_options_helper_test.rb
の修正です。
Action ViewでObject#=~
に関するwarningが出ている箇所があったのを修正しています。
Add test for travel_to
with time zone
activesupport/test/time_travel_test.rb
の修正です。
Time.zone
が設定されている環境でtravel_to
を使用した場合のテストを追加しています。
Ruby 2.6で、Time.zone
が設定されいる場合にtravel_to
が正しく動作しないという問題があり、その確認の為にテストを追加しています。
Use BigDecimal provided methods to convert String to BigDecimal
activesupport/lib/active_support/xml_mini.rb
の修正です。
ActiveSupport::XmlMini
でStringをBigDecimalを変換するのにBigDecimal
を使用していたのを、String#to_d
を使用するよう修正しています。
BigDecimal
だと不正な値が指定された場合に例外がraiseされる、しかし、ここでは例外をraiseしたくない為、不正な値を指定も例外がraiseされないString#to_d
を使用するようにしています。
Clarify the :to parameter of delegate
activesupport/lib/active_support/core_ext/module/delegation.rb
のdocの修正です。
Module#delegate
メソッドのdoc内、:to
オプションについて説明している箇所に、指定する値はターゲットオブジェクトの名前である(ターゲットオブジェクト自身ではない)旨説明を追加しています。
Merge pull request #33822 from y-yagi/do_not_check_parents_dor_directories
activesupport/lib/active_support/evented_file_update_checker.rb
の修正です。
ActiveSupport::EventedFileUpdateChecker
が、指定されたディレクトリが存在しない場合に、その対象の親ディレクトリをファイルシステムイベントの監視対象にしていたのを監視対象にしないよう修正しています。
親ディレクトリを監視対象にいれてしまうと、node_modules
のような本来監視対象にすべきじゃないディレクトリまで監視対象になってしまう為。代わりに、更新チェック時に対象のディレクトリが新規に作成されていないかどうをチェックするようにしています。
Merge pull request #34742 from kamipo/row_format_dynamic_by_default
activerecord/lib/active_record/connection_adapters/mysql/schema_statements.rb
の修正です。
MySQL adapterでtable作成時にデフォルトでROW_FORMAT=DYNAMIC
オプションを指定するよう修正しています。
utf8mb4
+ varchar(255)
のようなカラムに対してindexを貼る際に必要(データ長の問題により)な為。
Add missing require for String#to_d
activesupport/lib/active_support/xml_mini.rb
の修正です。
bigdecimal/util
のrequireが不足していたのを追加しています。
Fixes warning: mismatched indentations at 'rescue' with 'def' at 15
.
activesupport/test/core_ext/load_error_test.rb
の修正です。
warning: mismatched indentations
のwarningが出ている箇所があったのを修正しています。