2026/11/27分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
actionmailbox/CHANGELOG.md
actionpack/CHANGELOG.md
actionview/CHANGELOG.md
activesupport/CHANGELOG.md
actionmailer/CHANGELOG.md
railties/CHANGELOG.md
activerecord/CHANGELOG.md
Bound quoted name cache entries by byte size
activerecord/lib/active_record/connection_adapters/abstract/quoting.rbの修正です。
quoteしたカラム名、テーブル名のキャッシュについて、1KiBを超える名前はキャッシュしないよう修正しています。
Merge pull request #59962 from bruno-costanzo/fragment-cache-skip-unused-events
actionpack/lib/action_controller/log_subscriber.rb、
activesupport/lib/active_support/event_reporter/log_subscriber.rbの修正です。
enable_fragment_cache_loggingやlog_warning_on_csrf_failureでログ出力が無効になっている場合はevent reporterのeventを生成しないよう修正しています。
Merge pull request #59950 from mattyr/action-mailbox-conductor-routes-local-only
actionmailbox/lib/action_mailbox/engine.rb、
actionmailbox/config/routes.rbの修正です。
Action Mailboxのconductor用のroutesを、development及びtest環境でのみ定義、及び、bin/rails routesの結果に表示しないよう修正しています。
Merge pull request #59975 from yatmsu/hide-generator-flags-from-rails-new-help
railties/lib/rails/generators/rails/app/app_generator.rbの修正です。
rails new --helpにgenerator用のオプションが表示されないよう修正しています。
Merge pull request #59964 from bruno-costanzo/nested-attributes-scalar-id-lookup
activerecord/lib/active_record/nested_attributes.rb、
activerecord/lib/active_record/key.rbの修正です。
accepts_nested_attributes_forでのrecordのid比較処理について、single columnのidの場合はarrayに変換せずに比較するよう修正しています。
Merge pull request #59936 from 55728/fix-dirty-in-place-modification-doc-example
activemodel/lib/active_model/dirty.rbのdocの修正です。
ActiveModel::Dirtyのdocmodificationの例で、実際の戻り値とdocに記載されている値が異なっている箇所gああったのを修正しています。
Merge pull request #59983 from thomasklemm/thomasklemm/lease-registry-lockless-hit
activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rbの修正です。
LeaseRegistry#leaseで不要な場合はmutexの取得処理を行わないよう修正しています。
Merge pull request #59972 from bruno-costanzo/nested-default-deep-dup
activemodel/lib/active_model/attribute.rbの修正です。
JSONカラムなどのデフォルトnestした値がrecord間で共有されてしまていたのを、共有されないよう修正しています。
Merge pull request #59958 from bruno-costanzo/dup-lock-version-dirty-tracker
activemodel/lib/active_model/dirty.rbの修正です。
optimistic lockingを使用しているrecordをdupすると、コピーしたrecordのlock_versionがnilになってしまうバグがあったのを修正しています。
Give Live actions the event reporter context and tags of their request
Action Pack、Active Supportの修正です。
ActionController::Liveのactionで、Rails.eventのcontextとtagsに別のリクエストの値が使われてしまうバグがあったのを修正しています。
Merge pull request #59919 from milkcocoa/fix-action-view-strict-locals-block
Action Viewの修正です。
strict localsのデフォルト値でsafe navigation operatorを使用した場合に、unused blockのwarningが出力されてしまうバグがあったのを修正しています。
Return a plain String when truncate_bytes cuts an html_safe string
activesupport/lib/active_support/core_ext/string/filters.rbの修正です。
html_safeな文字列に対してString#truncate_bytesを使用すると、markupがescapeされ指定したバイト数を超える場合があったのを、String#truncateと同様にescapeしていないStringを返すよう修正しています。
Merge pull request #59952 from bastin27/fix-mailer-deliver-callbacks-without-mail
actionmailer/lib/action_mailer/base.rb、
actionmailer/lib/action_mailer/message_delivery.rbの修正です。
mailerのactionでmailが呼ばれなかった場合も、before_deliver、around_deliver、after_deliver等のコールバックが実行されていたのを、実行しないよう修正しています。
Merge pull request #59913 from 55728/fix-strong-parameters-nested-attributes-expect-doc
actionpack/lib/action_controller/metal/strong_parameters.rbのdoc修正です。
ActionController::StrongParametersのdocのaccepts_nested_attributes_forを使用したexpectのexmpleコードが正しく動作しない内容になっていたのを修正しています。
Honor DATE_FORMATS overrides of built-in formats
Active Supportの修正です。
Time::DATE_FORMATSやDate::DATE_FORMATSで:shortなどの組み込みのフォーマットを上書きしても反映されバグがあったのを修正しています。
Merge pull request #59911 from 55728/fix-message-pack-missing-namespaced-class
activesupport/lib/active_support/message_pack/extensions.rbの修正です。
MessagePackでseriralizeしたcacheについて、namespace付きのクラスが存在しない場合にキャッシュミスとして扱うよう修正しています。
Merge pull request #59908 from 55728/fix-response-content-type-non-string-header
actionpack/lib/action_dispatch/http/response.rbの修正です。
Content-TypeヘッダーにMime::Typeなど文字列以外の値を設定した場合にエラーになってしまうバグがあったのを修正しています。
Merge pull request #59903 from yahonda/fix-connection-pool-fiber-test-isolation-level-race
activerecord/test/cases/connection_pool_test.rbの修正です。
ConnectionPoolFiberTestでisolation levelを変更したタイミングによって、他のpoolのコネクションがリークし、以降のテストが大幅に遅くなる場合があったのを修正しています。
Merge pull request #59902 from hachi8833/revert_link_to_jemalloc_performance_guide
rails guideのTuning Performance for Deploymentの修正です。
guide内のjemallocへのリンクをfacebook/jemallocからjemalloc/jemallocに戻しています。jemallocのリポジトリがアーカイブ解除され再びアクティブになったため。
Merge pull request #59900 from fuzzyrichie/class-attribute-code-generator
activesupport/lib/active_support/core_ext/class/attribute.rbの修正です。
class_attributeで定義するメソッドをclass_evalでコンパイルしていたのを、ActiveSupport::CodeGeneratorを使って同じ属性名のメソッドをクラス間で共有するよう修正しています。
Don't share the query cache state with the ActionController::Live thread
actionpack/lib/action_controller/metal/live.rb、
activerecord/lib/active_record/railtie.rbの修正です。
ActionController::Liveのstreaming用のthreadがrequestのquery cacheを引き継いでしまい、stream内で同じレコードを繰り返し読み込むと古い結果が返ってしまうバグがあったのを修正しています。
Fix #33980: Parse escaped quotes in Accept headers
actionpack/lib/action_dispatch/http/mime_type.rbの修正です。
Acceptヘッダーのクォートされたパラメータ内にエスケープされた文字が含まれる場合に正しくパースできないバグがあったのを修正しています。
Merge pull request #58842 from rails/rmf-connection_pool
Active Supportの修正です。
connection_poolの実装をActive Supportに取り込み、connection_pool gemを依存から削除しています。Active Supportの依存を減らすため、との事です。
Merge pull request #59959 from wintan1418/document-s3-public-uploads-via-acl-default
rails guideのConfiguring Rails Applicationsの修正です。
config.active_storage.s3_public_uploads_via_aclのデフォルト値の説明がtrueのみになっていたのを、config.load_defaultsのバージョンごとのデフォルト値を記載するよう修正しています。
Declare Prism dependencies in Action View and Railties
railties/railties.gemspecの修正です。
prism gemのdependencyを指定しています。Ruby 4.1でprismがbundled gemになり、依存が無いとLoadErrorになってしまう可能性があるため。
Merge pull request #59627 from thomasklemm/thomasklemm/restore-max-password-length
activemodel/lib/active_model/secure_password.rbの修正です。
MAX_PASSWORD_LENGTH_ALLOWEDをBCryptPassword配下からActiveModel::SecurePasswordにも戻しています。この定数を参照しているアプリケーションがエラーにならないようにするため。
Merge pull request #59735 from thomasklemm/thomasklemm/upgrade-guide-pg-fixture-locks
rails guideのUpgrading Ruby on Railsの修正です。
PostgreSQL 18.4以降ではfixtureのロード時により多くのロックを取得するようになり、並列テストでout of shared memoryエラーになる場合がある旨説明を追加しています。
Merge pull request #59800 from thomasklemm/thomasklemm/lazy-indexed-keys
activemodel/lib/active_model/attribute_set.rb、
activemodel/lib/active_model/attribute_set/builder.rbの修正です。
LazyIndexedAttributeSet#keysで呼び出しのたびに不要なarrayを生成していたのを修正しています。
Allocate less per field in text_field_tag and tag
actionview/lib/action_view/helpers/form_tag_helper.rb、
actionview/lib/action_view/helpers/tag_helper.rbの修正です。
text_field_tagやtagで不要な計算やオブジェクトの生成を行わないよう修正しています。
Merge pull request #59984 from thomasklemm/thomasklemm/upgrade-guide-sidekiq-8-0-3
rails guideのUpgrading Ruby on Railsの修正です。
8.2ではSidekiq 8.0.3以降が必要な旨と、Sidekiqを初期化前にrequireしておく必要がある旨説明を追加しています。
Merge pull request #59985 from thomasklemm/thomasklemm/upgrade-guide-sendfile-unset
rails guideのUpgrading Ruby on Railsの修正です。
x_sendfile_headerが未設定の場合はRack::Sendfileがミドルウェアに含まれなくなり、insert_before Rack::Sendfileなどが起動時にエラーになる旨説明を追加しています。
Merge pull request #59812 from thomasklemm/thomasklemm/fix-flaky-ci-tests
actionpack/test/dispatch/server_timing_test.rbの修正です。
ServerTimingTestでヘッダーの値をsleepの長さと固定の許容範囲で比較していたため負荷の高い環境でテストが失敗する場合があったのを修正していmす。
Merge pull request #59817 from thomasklemm/thomasklemm/fix-ractor-proxy-unpin
activerecord/lib/active_record/connection_adapters/ractor_connection_handler/proxy.rb、
activerecord/lib/active_record/connection_adapters/ractor_connection_handler/proxy_connection_pool.rbの修正です。
Ractorのconnection proxyでunpinした際にpoolのunpinが行われず、writing poolがpinされたままになってしまっていたのを修正しています。
Keep navigation helpers available through UrlHelper
actionview/lib/action_view/helpers/url_helper.rbの修正です。
link_toやbutton_toなどがNavigationHelperに移動された影響で、UrlHelperやFormHelperを直接includeしているクラスでこれらのメソッドが使えなくなっていたのを修正しています。
Note in the upgrade guide that Action Mailer no longer loads Active Job
rails guideのUpgrading Ruby on Railsの修正です。
Action MailerがActive Jobのrailtieをロードしなくなったため、active_job/railtieを明示的にrequireする必要がある旨説明を追加しています。
Merge pull request #59987 from thomasklemm/thomasklemm/mailer-delivery-job-without-active-job
railties/lib/rails/application/configuration.rbの修正です。
config.load_defaultsでconfig.action_mailer.delivery_jobの設定をしないよう修正しています。設定内容がもうAction Mailerでデフォルト値になっており設定が不要、かつ、Action Mailerのロード時にActive Jobもロードされてしまい、activejob gemなしでAction Mailerが使えない、という問題があったため。
Merge pull request #59569 from thomasklemm/thomasklemm/association-scope-lazy-alias-tracker
activerecord/lib/active_record/associations/association_scope.rb、
activerecord/lib/active_record/associations/disable_joins_association_scope.rbの修正です。
AssociationScope#scopeで、throughではない関連付けで使わないAliasTrackerを生成しないよう修正しています。
Merge pull request #59661 from thomasklemm/thomasklemm/parameter-parsers-register-in-place
actionpack/lib/action_dispatch/http/parameters.rb、
actionpack/lib/action_dispatch/railtie.rbの修正です。
ActionDispatch::Request.parameter_parsersがfreezeされた影響で起動時にparameter_parsers[:jsonapi]経由でにパーサーを登録するとFrozenErrorになっていたのを、ractorize!が呼ばれるまではパーサーを変更出来るよう修正しています。
Merge pull request #59824 from thomasklemm/thomasklemm/form-builder-field-names
actionview/lib/action_view/helpers/form_tag_helper.rb、
actionview/lib/action_view/helpers/tags/base.rbの修正です。
form builderのfieldのid、nameを生成する際に、変更が不要な場合はstringのコピーを行わないよう修正しています。
Don't compare owner conditions when joining an association without a scope
activerecord/lib/active_record/reflection.rbの修正です。
関連先のdefault scopeに範囲外の値の条件がある場合に、関連付けをjoinsするとエラーになってしまうバグがあったのを修正しています。
Skip merging a blank relation into a relation without conditions
activerecord/lib/active_record/relation/merger.rbの修正です。
条件のないrelationに空のrelationをmergeする場合にearly returnするよう修正しています。
Merge pull request #59832 from thomasklemm/thomasklemm/errors-messages-for-no-errors
activemodel/lib/active_model/errors.rbの修正です。
エラーがないmodelでerrors[attr]を呼んだ場合にearly returnして不要なオブジェクトを生成しないよう修正しています。
Let a temporary SQLite table or view hide a permanent one in the schema readers
activerecord/lib/active_record/connection_adapters/sqlite3/schema_statements.rbの修正です。
SQLiteで通常のtableと同名のtemporary tableがある場合に、schema取得時にcolumnやindexが重複して正しく結果が取得出来ないバグがあったのを修正しています。
Merge pull request #59976 from thomasklemm/thomasklemm/index-definition-adapter-readers-2
activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rbの修正です。
lengthsやtypeなどのIndexDefinitionのreaderがadapter固有のクラスに移動された影響で、それ以外のadapterそれらのメソッドを呼ぶとNoMethodErrorになってしまっていたのを修正しています。
Keep the UTC offset in Time#change for times with a zone object
activesupport/lib/active_support/core_ext/time/calculations.rbの修正です。
zoneオブジェクトを持つTimeで、DST終了時に繰り返される時間帯の値に対してTime#changeを呼ぶとTZInfo::AmbiguousTimeになったり、時間が1時間ずれたりしてしまうバグがあったのを修正しています
Fix the attribute_method_affix example in Active Model docs [ci skip]
activemodel/lib/active_model/attribute_methods.rbの修正です。
attribute_method_affixメソッドのdoc内のexampleコードで処理が不足している箇所があったのを修正しています。
Merge pull request #59884 from smyk-git/fix-sti-type-condition-in-join-scope
activerecord/lib/active_record/reflection.rbの修正です。
STIのsubclassへのassociationのscopeにinheritance columnの条件がある場合に、joinsやeager_loadでSTIのtypeの条件が失われてしまうバグがあったのを修正しています。
Don't freeze serialized column defaults
Active Model、Active Recordの修正です。
serializeされた型ではデフォルト値をfreezeしないよう修正しています。デフォルト値がfreezeされるとcoderによってはカラムのデフォルト値と異なる値になるという問題があったため。
Add missing Active Support core extension requires
Action Pack、Active Supportの修正です。
不足していたrequireを追加しています。
Note in the upgrade guide that default_url_options is frozen by default
rails guideのUpgrading Ruby on Railsの修正です。
default_url_optionsがデフォルトでfreezeされたHashになり、直接変更するとFrozenErrorになることと、及び、代わりの設定方法についての説明を追加しています。
Find SQLite tables by any ASCII case of their name in the schema readers
activerecord/lib/active_record/connection_adapters/sqlite3/schema_statements.rb、
activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rbの修正です。
SQLite3 adapterで、大文字を含むようなテーブルを作成した場合に、大文字小文字が異なってもテーブルやindexの取得が出来るよう修正しています。
Let Attachment.from_node pick attachables the bulk lookup didn't locate
actiontext/lib/action_text/content.rbの修正です。
ActionText::Attachment.from_nodeをoverrideして独自のattachableを返すようにしていた場合にそのoverrideが使われなくなってしまっていたのを修正しています。
Bump the minimum supported SQLite version to 3.37.0
activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rbの修正です。
SQLite3 adapterでサポートするSQLiteの最小バージョンを3.37.0に変更しています。Rails 8.0からpragma_table_listを使用しており、3.37未満だと正しく動作しないため。
Fix Time.now(in:) raising inside travel_to
activesupport/lib/active_support/testing/time_helpers.rbの修正です。
travel_to、travel、freeze_timeのブロック内でTime.now(in: "+09:00")のように引数を指定するとエラーになっていたのを修正していまうs.
Fix row_count and exception in sql.active_record for async queries
activerecord/lib/active_record/connection_adapters/query_intent.rbの修正です。
load_asyncなどのasync queryについて、sql.active_recordイベントのpayloadが正しく設定されてなかったのを修正しています。
Fix receive_inbound_email_from_fixture raising when given a status
actionmailbox/lib/action_mailbox/test_helper.rbの修正です。
receive_inbound_email_from_fixture、receive_inbound_email_from_sourceにstatusを指定するとArgumentErrorになっていたのを修正sています。
Fix bin/rails notes raising on invalid bytes in a Ruby file's comment
railties/lib/rails/source_annotation_extractor.rbの修正です。
Rubyファイルのコメントに不正なUTF-8のバイトが含まれていると、bin/rails notesがエラーになっていたのを修正しています。
Fix collection options with a Proc for both value_method and selected
actionview/lib/action_view/helpers/form_options_helper.rbの修正です。
options_from_collection_for_selectやcollection_selectで、value_methodとselectedの両方にProcを指定するとエラーになっていたのを修正しています。
Fix the error type examples in full_messages_for and messages_for docs [ci skip]
activemodel/lib/active_model/errors.rbの修正です。
ActiveModel::Errors#full_messages_for及び#messages_forのdocのexampleコードで、実際には発生しないエラーを使用していたのを修正しています。