diff options
author | Tristan Harward <trisweb@gmail.com> | 2013-01-06 15:39:09 -0500 |
---|---|---|
committer | Tristan Harward <trisweb@gmail.com> | 2013-01-06 16:09:40 -0500 |
commit | 807e176aba7804cad8d630d04f3b771011be4fe6 (patch) | |
tree | b10a9346cf09ecf9c29c55075e201b4da96edc68 /activerecord/CHANGELOG.md | |
parent | 85afc11756630eb8d4bdc302ea026834251ffc8a (diff) | |
download | rails-807e176aba7804cad8d630d04f3b771011be4fe6.tar.gz rails-807e176aba7804cad8d630d04f3b771011be4fe6.tar.bz2 rails-807e176aba7804cad8d630d04f3b771011be4fe6.zip |
Fix error when assigning NaN to an integer column
Also covers any non-castable case by returning nil, which
is in-line with the intention of the former implementation,
but covers the odd cases which respond to to_i but raise
an error when it's called, such as NaN, Infinity and -Infinity.
Fixes #8757
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r-- | activerecord/CHANGELOG.md | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 3a0af57f64..f098c49136 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -4,10 +4,11 @@ *Rob Worley* -* Fix undefined method `to_i` when calling `new` on a scope that uses an Array. - Fixes #8718, #8734. +* Fix undefined method `to_i` when calling `new` on a scope that uses an + Array; Fix FloatDomainError when setting integer column to NaN. + Fixes #8718, #8734, #8757. - *Jason Stirk* + *Jason Stirk + Tristan Harward* * Rename `update_attributes` to `update`, keep `update_attributes` as an alias for `update` method. This is a soft-deprecation for `update_attributes`, although it will still work without any @@ -17,7 +18,7 @@ *Amparo Luna + Guillermo Iguaran* * `after_commit` and `after_rollback` now validate the `:on` option and raise an `ArgumentError` - if it is not one of `:create`, `:destroy` or ``:update` + if it is not one of `:create`, `:destroy` or `:update` *Pascal Friederich* |