なるようになるブログ

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

rails commit log流し読み(2023/01/05)

2023/01/05分のコミットです。

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


Reduce two Array allocations

activesupport/lib/active_support/callbacks.rbの修正です。

__update_callbacksメソッドでArrayオブジェクトの生成数を減らすよう修正しています。


require active_support/test_case instead of minitest

actionpack/lib/action_dispatch/testing/integration.rbの修正です。

minitestをrequireしていたのをactive_support/test_caseをrequireするよう修正しています。ActieveSupport::TestCaseをファイル内で使用している為。


LogSubscriber: Fix example syntax for color in deprecation message

activesupport/lib/active_support/log_subscriber.rbの修正です。

LogSubscriberでdeprecatedになったオプションの指定をした場合に表示されるdeprecateメッセージ内のオプションの指定方法が誤っていたのを修正しています。


Improve demodulize performance by not allocating a Range object

activesupport/lib/active_support/inflector/methods.rbの修正です。

demodulizeメソッドでRangeオブジェクトの生成を行わないよう修正しています。


Use backticks for all querying method headings [ci-skip]

rails guideのActive Record Query Interfaceの修正です。

メソッド名が見出しになっている箇所が、バッククォートで囲まれたり囲まれてなかったりと統一されて無かったのを、全てバッククォートで囲むよう修正しています。


require erb at the place where ERB is in use

activesupport/lib/active_support/core_ext/erb/util.rbactivesupport/lib/active_support/core_ext/string/output_safety.rbの修正です。

erbのrequireを実際にerbを使用しているファイルで行うよう修正しています。


Method redefinition is no longer in use here

activesupport/lib/active_support/core_ext/string/output_safety.rbの修正です。

使用していないrequireを削除しています。


Only establish temporary pool in prepare_all

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

prepare_allでのみconnectionの接続を行い、他のDB関連のtaskではconnectionの接続処理が行われないよう修正しています。


String#* takes one argument, and in that case, better not splat the arg

activesupport/lib/active_support/core_ext/string/output_safety.rbの修正です。

SafeBuffer#*メソッドで不要なArrayオブジェクトの生成を行わないよう修正しています。


Use Ruby 3.2 for RuboCop workflow

.github/workflows/rubocop.ymlGemfile.lockの修正です。

RuboCopを実行するのに使用するRubyを3.2に更新、及び、RuboCop関連のgemを最新バージョンに更新しています。


Use cached instance of ruby_version inside RubyGems

railties/lib/rails/ruby_version_check.rbの修正です。

Rubyのバージョンを参照するのにRubyGemsが内部でキャッシュしている値を使用するよう修正しています。が、module名をタイポしていたようで、NameErrorでエラーになってしまうようになったので後ほどRevertされています。


Revert "Use cached instance of ruby_version inside RubyGems"

直前のRubyのバージョンを参照する対応をRevertしています。


Merge pull request #46879 from fatkodima/db_prepare-fix-test-environment

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

db:prepare task実行時にinternal_metadataに誤ったenvironmentが登録されてしまっていたのを修正しています。