2016/04/25分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
:nodoc: internal StatementPool class.
activerecord/lib/active_record/connection_adapters/statement_pool.rb
のdocの修正です。
Rails内部用のクラスであるActiveRecord::ConnectionAdapters::StatementPool
に:nodoc:
を設定しています。
Share lock: more accurate livelock fix for aa598f4
activesupport/lib/active_support/concurrency/share_lock.rb
の修正です。
Share lock: avoid livelock due to exclusive thread sleeping before wa… · rails/rails@aa598f4で、#yield_shares
に渡すブロックの中で、排他スレッドの処理終了を待つ前に#broadcast
を使用してスレッドを再開するよう修正したのですが、ブロックではなく、#yield_shares
メソッド自体で#broadcast
を呼び出すよう修正しています。
@@ -69,7 +69,6 @@ def stop_exclusive(compatible: []) if eligible_waiters?(compatible) yield_shares(compatible: compatible, block_share: true) do - @cv.broadcast @cv.wait_while { @exclusive_thread || eligible_waiters?(compatible) } end end @@ -145,9 +144,9 @@ def yield_shares(purpose: nil, compatible: [], block_share: false) end compatible |= [false] unless block_share @waiting[Thread.current] = [purpose, compatible] - - @cv.broadcast end + + @cv.broadcast
より正確にロックの管理を出来るようにする為、のようなのですが、よくわからない…。
Include the Savepoints module in all adapters.
Active Recordの修正です。
各connection adaptersそれぞれでincludeしていたtransaction savepoint用のmodule(Savepoints
)を、abstract adapterで読み込むよう修正しています。
removes useless use of string interpolation
railties/lib/rails/all.rb
の修正です。
Stringを""で囲んで式展開している箇所から、不要な式展開を削除しています。
begin - require "#{railtie}" + require railtie rescue LoadError
rewords code comment [ci skip]
activesupport/lib/active_support/core_ext/object/blank.rb
のdocの修正です。
String#blank?
メソッドのコード内の、処理内容についての説明のコメントを修正しています。
Active Recordの修正です。
statement limitのデフォルトの値(1000)が各コード内に数字のまま使用されていたのを、定数を使用するよう修正、及びstatement limitを保持する変数名がmax
になっていたのを、statement_limit
に修正しています。
remove_index do not fetch indexes if name is specified
activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
の修正です。
remove_index
メソッドの引数にoptions[:name]
が指定された場合は、全てのテーブルのフェッチ処理は行わないよう修正しています。 nameが指定された場合は、そのnameをそのまま使用すればよい為。
Add Expression Indexes and Operator Classes support for PostgreSQL
Active Recordの修正です。
PostgreSQLのExpression Indexes及びOperator Classesをmigrationファイルで使用出来るよう対応しています。
CHANGELOGより。
create_table :users do |t| t.string :name t.index 'lower(name) varchar_pattern_ops' end
Operator Class(演算子クラス)というもの自体を初めて知りました。
参考:
Merge pull request #23103 from rails/refactor-handling-of-action-default
Action Packの修正です。
routesに:action
が指定されていなかった場合に、route生成処理中にpath parametersの値を書き換えていたのを、path parametersの値を変更しないようリファクタリングを行なっています。
remove unnessary option setting from test runner
railties/lib/rails/test_unit/minitest_plugin.rb
の修正です。
rake test
タスクに、rake
コマンドのオプションを指定した場合に、エラー(OptionParser::ParseError
)になっていたのを、エラーにならないよう修正しています。
register rake options to OptionParser
railties/lib/rails/tasks/routes.rake
の修正です。
rake routes
タスクに、rake
コマンドのオプションを指定した場合に、エラー(OptionParser::ParseError
)になっていたのを、エラーにならないよう修正しています。
Remove Array#sum
method before override it
activesupport/lib/active_support/core_ext/enumerable.rb
の修正です。
独自のArray#sum
メソッドを定義する前に、remove_method
メソッドで既に定義済みのsum
メソッドを削除するよう修正しています。
削除しないと、Rubyのwarning(warning: method redefined; discarding old sum
)が出てしまう為。