2015/10/22分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Add Module#remove_possible_singleton_method
activesupport/lib/active_support/core_ext/class/attribute.rb
、
activesupport/lib/active_support/core_ext/module/remove_method.rb
の修正です。
singleton methodを削除する為のModule#remove_possible_singleton_method
メソッドを追加しています。
singleton methodを再定義する際、Rubyのwarningが出てしまうので、それを避ける為に、定義処理の前に削除を行うようにするためにメソッドを追加したとの事です。
Extract native getter to attr_reader.
activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
の修正です。
native
変数の値を取得するように、native
メソッドをわざわざ定義したのを、attr_reader
を使用するよう修正しています。
remove unnecessary forwardable require
actionpack/lib/action_dispatch/routing/route_set.rb
の修正です。
使用していないforwardable
のrequireを削除しています。
Remove #tables
extra args again
activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb
、
activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb
の修正です。
tables
メソッドから、不要な引数(database
、like
)を削除しています。
Refactor table_exists?
in AbstractMysqlAdapter by kamipo · Pull Request #21687 · rails/rails で一度削除する対応を行っていたのですが、先日マージされた、Match table names exactly on MySQL by al2o3cr · Pull Request #18856 · rails/rails で消した引数が復活してしまったので、再度対応行われています。
Merge pull request #21950 from rafaelsales/issues/21922-fix-ar-group-by-attribute-lookup https://github.com/rails/rails/commit/f66b68173a11d0ef8f4bb6253386c15d031017ba
activerecord/lib/active_record/relation/calculations.rb
の修正です。
joins
してgroup
した場合に、group
の引数に、joinしたテーブルとjoin元のテーブル両方に存在するカラム名を指定した場合に、SQLエラーになっていたのを修正しています。
Change Integer#year to return a Fixnum instead of a Float to improve consistency
activesupport/lib/active_support/core_ext/integer/time.rb
の修正です。
Integer#year
メソッド(aliasのyears
も同様)の戻り値がFloat
からFixnum
に変更になりました。
# before: 1.year # => 31557600.0 # affter: 1.year # => 31557600
Integer#month
、Integer#day
メソッド等他の日付系のメソッドは元々Integerを返すようになっていたので、それに合わせる為、修正したとの事です。
Suppress warnings (warnings about AD::IntegrationTest HTTP request)
actionpack/test/controller/integration_test.rb
の修正です。
rss_atomの取得についてのテストで、get
メソッドの引数にキーワード引数を使用するよう修正しています。
Use sufficient a regexp anchor to check @response.content_type.to_s
actionpack/lib/action_dispatch/testing/assertions.rb
の修正です。
html_document
メソッドで、@response.content_type
がxmlかどうかのチェックを行う正規表現で、$
の代わりに\z
を使うよう修正しています。
Refactored association preloader for performance
activerecord/lib/active_record/associations/preloader/association.rb
の修正です。
association preloader処理のリファクタを行っています。
不要なArrayを作成しないよう修正、及び、ネストループを減らすよう改善を行っています。