なるようになるブログ

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

rails commit log流し読み(2023/07/25)

2023/07/25分のコミットです。

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

actioncable/CHANGELOG.md

actionmailer/CHANGELOG.md


Make ActiveRecord's quoted name caches thread-safe.

Active Recordの修正です。

quoted name(quoted_column_namesと`quoted_table_names@)のcacheの設定処理がJRuby/TruffleRubyでtherad-safeになるよう修正しています。CRubyが問題無いのはGVLがある為。


Introduce capture_emails and capture_broadcasts (#48798)

Action Cable、Action Mailerの修正です。

`assert_emails`: return the emails that were sentassert_emailsの戻り値としてblock内で送信したメールを返すよう、`assert_broadcasts`: return the messages that were broadcastassert_broadcastsがbrodcastしたメッセージを返すようそれぞれ修正したのですが、assertionに副作用があるのは良くない、という指摘が入りました。

そのため、これらの挙動は元に戻して、代わりにそれぞれと同じ内容を取得する為のcapture_broadcastscapture_emailsを追加しています。


Tweak alias_attribute deprecation message

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

Call proxy methods from alias_attribute generated methodsによる挙動の変更により、alias_attributeメソッドのaliasで呼び出されるよう明示的にメソッドの定義が必要なバ場合に出力するメッセージの言い回しを修正しています。