なるようになるブログ

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

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

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

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


Add title tag to mailer previews

railties/lib/rails/mailers_controller.rbrailties/lib/rails/templates/rails/mailers/email.html.erbの修正です。

mailer previewの詳細ページにtitleタグが無かったのを追加しています。


Merge pull request #37102 from y-yagi/fixes_37011

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

appディレクトリ直下に、ディレクトリではなくファイルがあった場合にRailsの初期化処理でエラーになってしまうバグがあったのを修正しています。


Fix href to replace http with https in the Yay! You’re on Rails! page

railties/lib/rails/templates/rails/welcome/index.html.erbの修正です。

Welcomeページで表示されるrubyonrails.orgへのリンクをhttpsに修正しています。


Prefer normal method call over method_missing

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

Chars#limitメソッドでtruncate_bytesを実行するのにmethod_missingに依存していたのを、必要なメソッドを直接呼ぶよう修正しています。


Passing in a Hash instance as non-kwargs parameters has to be braced in Ruby 3.0 syntax

activesupport/test/message_encryptor_test.rbactivesupport/test/message_verifier_test.rbの修正です。

Hashを非キーワード引数として渡す際に、{}で囲むよう修正しています。

Ruby 3.0に向けてのキーワード引数の挙動の整理がRuby 2.7で行われており、その対応の一環です。以降、同様にキーワード引数の対応が続きます。

参考: Feature #14183: "Real" keyword argument - Ruby master - Ruby Issue Tracking System


Passing in a Hash instance as kwargs parameters requires the "double splat" prefix

Hashをキーワード引数として渡す際にdouble splatを指定してkeyword splatが行われるよう修正しています。


I18n.translate takes kwargs options

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

translate_number_value_with_defaulttranslate_in_localeメソッドでキーワード引数にdouble splatを指定するよう修正しています。


:number is not a keyword argument

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

ordinalsordinalizedの引数指定から:numberキーワード引数を削除しています。実際にはキーワード引数としては渡されてない(options引数として渡される)為。


subscribe block doesn't take keyword arguments

activesupport/test/deprecation_test.rbの修正です。

ActiveSupport::Notifications.subscribeを呼び出す際の引数をsingle splatに変更しています。subscribeはキーワード引数を受け取らない為。


Unify the API with Messages::Rotator::Verifier#verify that takes kwargs

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

Messages::Rotator::Verifier#verifyメソッドの引数指定にdouble splatを追加しています。


Introduce keyword arguments for some AS::Cache methods

ActiveSupport::Cacheの各メソッドの引数指定にdouble splatを追加しています。


Passing in a Hash instance as kwargs parameters requires the "double splat" prefix

actionpack/lib/action_dispatch/middleware/cookies.rbの修正です。

Hashをキーワード引数として渡す際にdouble splatを指定するよう修正しています。


Passing in a Hash instance as non-kwargs parameters has to be braced in Ruby 3.0 syntax

actionpack/test/dispatch/cookies_test.rbactionpack/test/dispatch/session/cookie_store_test.rbの修正です。

Hashを非キーワード引数として渡す際に、{}で囲むよう修正しています。


RequestEncoder.register_encoder takes keyworded arguments

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

RequestEncoder.register_encoderでキーワード引数を受け取れるよう修正しています。


These RequestHelpers' methods take keyword arguments

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

RequestHelpersのメソッドでキーワード引数を受け取れるよう引数指定を修正しています。


send with **options only when options is not empty

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

RequestHelpersのメソッドを呼びだす際に、optionsが空でない場合にのみoptionsを指定するよう修正しています。ArgumentErrorが発生するのを避ける為。


Intern ActiveJob queue_name

activejob/lib/active_job/queue_name.rbの修正です。

queue_nameをfreezeするようにして不要なオブジェクトの生成を減らすよう修正しています。