2016/11/18分のコミットです。
CHANGELOGへの追加はありませんでした。
Fix mucking of connection_config leading to issues in prepared_statements
activerecord/test/cases/adapters/postgresql/prepared_statements_test.rb
の修正です。
prepared statementsのテストで、prepared_statements
の値を操作するのにconnection_config
を使用していたのを、ActiveRecord::Base.connection
の値を直接操作するよう修正しています。
rails guideのRuby on Rails Security Guide
の修正です。
deprecatedになっていたSafeERB
gem について言及していた箇所があったのを削除しています。
Call fallback exception handlers with the right exception
activesupport/lib/active_support/rescuable.rb
の修正です。
ActiveSupport::Rescuable.rescue_with_handler
メソッドでhandlerが使用するexceptionが誤っていた(handlerが取得出来た際のexceptionを使用するべきところが、最初にrescue_with_handler
の引数に指定されたexceptionを使うようになっていた)のを修正しています。
Merge pull request #26980 from kamipo/respect_new_records_for_collection_proxy_distinct
activerecord/lib/active_record/associations/collection_association.rb
、
activerecord/lib/active_record/associations/collection_proxy.rb
の修正です。
ActiveRecord::CollectionProxy#uniq
がデータにnew recordを含んでいた場合に誤った値を返していたのを、new recordが含まれていた場合の正しい値を返すよう修正しています。
Refactor the handling of fallback exception handlers
activesupport/lib/active_support/rescuable.rb
の修正です。
ActiveSupport::Rescuable.rescue_with_handler
メソッドでexceptionは取得出来るがhandlerが取得出来なかった場合の対応を追加しています。
Updated Sprockets Documentation
rails guideのThe Asset Pipeline
の修正です。
Making Your Library or Gem a Pre-Processor
の項の内容が古いsprocketsに対応した内容になっていたのを、最新のsprocketsに対応した内容に更新しています。
Merge pull request #27070 from jonhyman/patch-raw-true
activesupport/lib/active_support/cache/mem_cache_store.rb
の修正です。
MemCacheStore#read_multi
メソッドでDalli#get_multi
メソッドを呼び出す際に、raw: true
オプションを指定していたのを削除しています。
Dalli#get_multi
には取得したいデータのkeyだけを渡す(https://github.com/petergoldstein/dalli/blob/master/lib/dalli/client.rb#L66)必要があり、そこにraw: true
というHashを渡す事により、raw: true
もkeyとして扱われてしまい、無駄なcacheの検索処理が行われてしまっていたため、削除したとの事です。
Merge pull request #26981 from kamipo/should_not_except_order_for_exists
activerecord/lib/active_record/relation/finder_methods.rb
の修正です。
exists?
メソッドで、limit_value
が指定されている場合はunscope(:order)
を行わないよう修正しています。
Merge pull request #26551 from mgpnd/FixContentLength
actionpack/lib/action_controller/test_case.rb
の修正です。
ActionController::TestRequest
のCONTENT_LENGTH
headerに文字数を設定していたのを、バイト数を設定するよう修正しています。
- set_header "CONTENT_LENGTH", data.length.to_s - set_header "rack.input", StringIO.new(data) + data_stream = StringIO.new(data) + set_header "CONTENT_LENGTH", data_stream.length.to_s + set_header "rack.input", data_stream
バイト数が設定されないとJSONへのパース処理等、正確な数字が必要な場合にエラーになってしまう為との事です。
remove Ruby warning from Active Job test helper methods
activejob/lib/active_job/test_helper.rb
の修正です。
assert_enqueued_with
、assert_performed_with
メソッドでRubyのwarning(shadowing outer local variable - job
)が出ていたので、変数名を変更して対応しています。