2014/05/12分のコミットです。
PostgreSQLのDB Adapterの修正が多かった日でした。
PKにbigserialが指定出来ないバグ、Infinity/NaN
を正しく扱う為の修正等行われています。
Tidy up implementation of #15010
ActiveSupport::TimeZone#parse
メソッドの修正です。
昨日行われた月のデフォルトの値の修正について、リファクタリングしています。
Replace :base with :in [ci skip]
railties/lib/rails/generators/base.rb
のdocの修正です。
オプションを:base
-> :in
に修正しています。docの修正漏れ対応です。
Merge pull request #10662 from take/change-test-name-for-ActiveRecord--Validations#valid-
activerecord/test/cases/validations_test.rb
の修正です。
テストメソッド名の修正及び、save
メソッドで結果の確認をしている箇所をvalid?
メソッドに修正しています。
Remove redundant tests method.
actionpack/test/controller/send_file_test.rb
の修正です。
不要なtests
メソッドを削除しています。
correcting method documentation [ci skip]
ActiveRecord::AttributeMethods#attribute_present?
のdocの修正です。
person = Task.new(title: '', is_done: false)
となっていた箇所をtask = Task.new(title: '', is_done: false)
に修正しています。
変数名をクラス名に合わせています。
こちらもActiveRecord::AttributeMethods#attribute_present?
のdocの修正です。
- # task.title = 'Francesco' + # task.title = 'Buy milk'
これは、何の為の修正だろう…。
Modify assert conditions not to be affected
activerecord/test/cases/relation/merging_test.rb
の修正です。
to_sql
メソッドのテストを修正しています。
Handle other pk types in PostgreSQL gracefully.
activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb
の修正です。
PKにbigserial型を指定出来なかったバグを修正しています。
pg, fix Infinity and NaN values conversion.
PostgreSQLAdapter::OID::Float#type_cast
メソッドの修正です。
DBの値がInfinity/-Infinity/NaN
だった場合に、それぞれFloat::INFINITY
、Float::NAN
を返すように修正しています。
# before Point.create(value: 1.0/0) Point.last.value # => 0.0 # after Point.create(value: 1.0/0) Point.last.value # => Infinity
Infinity
が入るケースって、どんな使い方している時なんだろう。
pg, map char
and name
types as string. [dark-panda & Yves Senn]
activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb
及びテストの修正です。
PostgreSQLは特別な文字型として、"char"
とname
という名前の型があるので、その型を適切に扱えるよう修正しています。
PostgreSQLのdocはこちら。name
は知らなかったです。