2016/10/06分のコミットです。
CHANGELOGへの追加はありませんでした。
Merge pull request #26359 from maclover7/jm-speed-up-time
activesupport/lib/active_support/time_with_zone.rb
の修正です。
ActiveSupport::TimeWithZone#transfer_time_values_to_utc_constructor
メソッドで、引数がTime
インスタンス、かつ、time zoneがutc
の場合、不要なTime
のインスタンスを生成しないよう修正しています。
+ # avoid creating another Time object if possible + return time if time.instance_of?(::Time) && time.utc? ::Time.utc(time.year, time.month, time.day, time.hour, time.min, time.sec + time.subsec)
Merge pull request #25304 from kbrock/calculate_attributes
activerecord/lib/active_record/relation/calculations.rb
の修正です。
ActiveRecord::Calculations#aggregate_column
メソッドでcolumn名のチェックにcolumn_names
を使用していたのを、attribute_names
を使用するように修正しています。
既存の処理(https://github.com/rails/rails/blob/0fc115724b87f7b4c990dc26d8b42f48ae72dfeb/activerecord/lib/active_record/relation/calculations.rb#L174 )と処理を合わせる為のようです。
Merge pull request #26633 from kamipo/text_too_big_should_be_text
activerecord/test/cases/migration/column_attributes_test.rb
の修正です。
巨大なtextカラムを作成するテストで、integer
型のカラムを作成していたのを、text
型のカラムを作成するよう修正しています。
Merge pull request #26631 from kamipo/remove_duplicate_condition
activerecord/test/cases/migration/column_attributes_test.rb
の修正です。
test_native_decimal_insert_manual_vs_automatic
テストの中でcurrent adapterがSQLite3Adapter
かどうかチェックしていたのを削除しています。
テスト自体がSQLite3Adapter
じゃないと通らないようになっており、メソッドの中でチェックする必要は無い為。
Close the IO from the read loop thread
actioncable/lib/action_cable/connection/stream.rb
、
actioncable/lib/action_cable/connection/stream_event_loop.rb
の修正です。
ActionCable::Connection::Stream#clean_rack_hijack
で行っていたioのclose処理を、ActionCable::Connection::StreamEventLoop#detach
で行うよう修正しています。
スレッドをまたいでのIOのclose / readが上手く動作しない(競合状態になった際にsegfaultしてしまう事がある)為、修正したとの事です。
Use a branch of websocket-client-simple, to work around read/close race
Gemfile
の修正です。
forkしたwebsocket-client-simple
gemを使用するよう修正しています。
websocket-client-simple
には、socketのread/closeがrace状態になった場合にsegfaultしてしまう問題があり、それに対応したブランチを使用しています。
Wait for the socket to be closed asynchronously
actioncable/test/connection/client_socket_test.rb
の修正です。
shutdown時にi/o socket がcloseされる事を確認するテストで、Concurrent::Event
を使用してcloseの確認を非同期に行うよう修正しています。