2020/10/27分のコミットです。
CHANGELOGへの追加はありませんでした。
activerecord/lib/active_record/migration.rb
の修正です。
PendingMigration
が発生した際に、pendingになっているmigration名を表示するよう修正しています。
Merge pull request #40204 from jhawthorn/helper_module_copy_on_write
actionpack/lib/abstract_controller/helpers.rb
、
actionview/lib/action_view/test_case.rb
の修正です。
アプリ側で明示的にhelperの変更を行わない場合、不要なhelper用のmoduleを作成しないよう修正しています。オブジェクトの生成を減らすようにする為。
String#unicode_normalize is a public method
activesupport/lib/active_support/multibyte/chars.rb
の修正です。
publicメソッドを呼び出すのにsend
を使用していたのを、直接メソッドを呼び出すよう修正しています。
AS::Multibyte::Chars#reverse and tidy_bytes are public methods
activesupport/lib/active_support/multibyte/chars.rb
の修正です。
public methodsを呼び出すのにsend
を使用していたのを、public_send
を使用するよう修正しています。
before_save and after_save in this test class are defined as public methods
activesupport/test/callbacks_test.rb
の修正です。
public methodsを呼び出すのにsend
を使用していたのを、public_send
を使用するよう修正しています。
*_digest is defined as a public method
activemodel/lib/active_model/secure_password.rb
の修正です。
public methodsを呼び出すのにsend
を使用していたのを、public_send
を使用するよう修正しています。
These test model accessors are public methods
activemodel/test/models/contact.rb
、
activemodel/test/models/topic.rb
の修正です。
public methodsを呼び出すのにsend
を使用していたのを、public_send
を使用するよう修正しています。
Mapper#resource and resources are both public methods
actionpack/lib/action_dispatch/routing/mapper.rb
の修正です。
public methodsを呼び出すのにsend
を使用していたのを、public_send
を使用するよう修正しています。
Module#attr_reader/writer are public methods since Ruby 2.5
activesupport/lib/active_support/core_ext/module/attr_internal.rb
の修正です。
public methodsを呼び出すのにsend
を使用していたのを、public_send
を使用するよう修正しています。
class_attributes are defined as public methods
actionmailer/lib/action_mailer/delivery_methods.rb
の修正です。
public methodsを呼び出すのにsend
を使用していたのを、public_send
を使用するよう修正しています。
Methods defined per Action View templates are public methods
actionview/lib/action_view/base.rb
の修正です。
public methodsを呼び出すのにsend
を使用していたのを、public_send
を使用するよう修正しています。
Remove unused internal methods in ActiveModel::Attributes
activemodel/lib/active_model/attributes.rb
の修正です。
ActiveModel::Attributes
内の使用していないメソッドを削除しています。
Use attribute_before_type_cast
in the internal
Active Recordの修正でs.
type cast前のattributeを取得するのに、read_attribute_before_type_cast
を使用していたのを、attribute_before_type_cast
を使用するよう修正しています。
Fix read_attribute_before_type_cast
to consider attribute aliasesの対応により、read_attribute_before_type_cast
はattribute_before_type_cast
より遅くなっている為。
Merge pull request #40414 from Shopify/handle-frozen-paylaods
activerecord/lib/active_record/type/serialized.rb
の修正です。
ActiveRecord::Type::Serialized
のencode処理で、encodingの設定前に、値がfreeze済みの場合dup
してからencodingの設定を行うよう修正しています。
Merge pull request #40457 from HParker/specify-per-param-encoding
Action Packの修正です。
controllerで、actionのparam毎にencodingを指定出来るよう対応しています。encodingの指定はparam_encoding
メソッドで行えるようになっています。
class RepositoryController < ActionController::Base # `file_path`のencodingを`Encoding::ASCII_8BIT`にする param_encoding :show, :file_path, Encoding::ASCII_8BIT def show @repo = Repository.find_by_filesystem_path params[:file_path] # params[:repo_name]は`UTF-8`のまま @repo_name = params[:repo_name] end end