なるようになるブログ

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

rails commit log流し読み(2019/09/08)

2019/09/08分のコミットです。

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


Class#new also separates keyword arguments and optional hash

Class#newがキーワード引数とoptional hashを分離するようになった為、それぞれ別に渡すよう修正しています。

が、これだとRuby 2.6以下だと期待通りに動作しない為、後ほどRevertしています。


Handle kwargs only in Ruby >= '2.7'

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

Include kwargs definition in the generated method signatures and method callsのリトライとして、Ruby 2.7以上の場合のみattribute methodsでキーワード引数を受け取れるよう修正しています。


Revert "Class#new also separates keyword arguments and optional hash"

キーワード引数とoptional hashを別に渡すよう修正した、Class#new also separates keyword arguments and optional hashをRevertしています。


rubocop

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

rubocopの設定に違反している箇所があったのを修正しています。


Merge pull request #37153 from eugeneius/marshal_inspected_records

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

parameterのfilterに使われるクラスを無名クラスから通常のクラスに変更しています。無名クラスだとMarshalした際にエラーになってしまう為。