2016/10/15分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Merge pull request #26788 from Jesus/master
activesupport/lib/active_support/core_ext/hash/transform_values.rb
の修正です。
Ruby本体が提供しているHash#transform_values
が使える場合(Ruby 2.4以上)、そちらを使用する(RailsでHash#transform_values
)を使用しないよう修正しています。
RubyのHash#transform_values
はCで実装されており、そちらの方が高速な為。
Merge pull request #26785 from yahonda/diag26774
activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb
の修正です。
ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter#indexes
メソッドで、SUB_PART
カラムの値を取得した際に、to_i
メソッドを呼んで明示的にintegerに変換するよう修正しています。
- indexes.last.lengths.merge!(row[:Column_name] => row[:Sub_part]) if row[:Sub_part] + indexes.last.lengths.merge!(row[:Column_name] => row[:Sub_part].to_i) if row[:Sub_part]
元々bigint(3)
だったinformation_schema.statistics
テーブルのSUB_PART
カラムが、MySQL 8.0.0-dmrでvarbinary(12)
に型が変わってしまった為。
Add comment to remove code when we are in Ruby 2.4
activesupport/lib/active_support/core_ext/hash/transform_values.rb
の修正です。
Ruby 2.4以上をサポートした場合、ファイル自体が不要になる旨コメントを追加しています。
Merge pull request #26784 from kamipo/quote_table_name_properly
activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb
、
activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
、
activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb
の修正です。
table nameをquoteする際に、シングルクォートで囲むだけだったのを、quote
メソッドを使用してquote処理を行うよう修正しています。
Introduce a benchmark template [ci skip]
bug report templateにbenchmark取得用のtemplateを追加しています。
元々はContributing to Ruby on Rails
guideのBenchmark Your Code
の項にbenchmark-ips
を使用したサンプルコードが記載されていたのですが、サンプルでは無く実際に動くコードがあった方が良いだろう、という事でtemplateが追加されたようです。
Pull request for ticket 26769 (#26770)
Configuring Rails Applications
guideの修正です。
config.log_formatter
について説明している箇所に、production envでのデフォルトはLogger::Formatter
である旨説明が記載されていたのですが、実際はActiveSupport::Logger::SimpleFormatter
だった為、その旨説明を修正しています。
Merge pull request #26598 from rutaka-n/raise_record_not_found_with_correct_params
activerecord/lib/active_record/relation/finder_methods.rb
の修正です。
ActiveRecord::FinderMethods#raise_record_not_found_exception!
でRecordNotFound
をraiseする際に、name
パラメータの値も含むよう修正しています。
- raise RecordNotFound, error + raise RecordNotFound.new(error, name)
association経由でfinderメソッドを使用した場合にmodel名を含まれるようにする為。
Merge pull request #26793 from zachaysan/master
actionpack/lib/action_dispatch/testing/integration.rb
の修正です。
ActionDispatch::Integration::Session#process
メソッドをpublicメソッドに移動、及びActionDispatch::Integration::RequestHelpers#get
メソッドのdocに記載されていたhtttp request methodについての説明を#process
メソッドのdocに移動しています。
ActionDispatch::Integration
クラスで定義されている以外のhttp method(OPTIONS
等)のテストをしたい場合に、#process
メソッドを使用する必要がある為 public methodにしたとの事です。
actionpack/lib/action_dispatch/testing/integration.rb
のdocの修正です。
ActionDispatch::Integration::Session#process
メソッドのdocの言い回し、グラマーの修正を行っています。
Merge pull request #26786 from codeodor/patch-1
actionpack/lib/action_controller/renderer.rb
の修正です。
ApplicationController.renderer
のenvironmentに、Rails内部で保持しているkey(ActionController::Renderer::RACK_KEY_TRANSLATION
)以外のkeyを指定した場合に、render時にそのenvironmentの値がnilになっていたのを、keyをStringに変換した値を返すよう修正しています。
- def rack_key_for(key); RACK_KEY_TRANSLATION[key]; end + def rack_key_for(key) + RACK_KEY_TRANSLATION.fetch(key, key.to_s) + end