This project is archived and is in readonly mode.
BigDecimal comparison failure in sqlite3_test on 1.9.2-head
-
Aaron Patterson
This is a floating point rounding problem. SQLite3 stores the big decimal as a floating point value. When the float comes back out of SQLite3 and is converted to a Float in ruby is where the problem lies. The rounding rules seem to have changed from 1.8 to 1.9 such that it makes this test break.
Since it's stored as a float, we should be using assert_in_delta() for this test. I've attached a patch which fixes the test.
-
Aaron Patterson
- Tag changed from rails 3, 1.9.2, activerecord, sqlite3 to rails 3, 1.9.2, activerecord, patch, sqlite3
-
Repository
- State changed from committed to resolved
(from [8e56085817e752bb361738ec6ca7362a3398ed77]) use assert_in_delta() for floating point comparisons in tests [#4871 BigDecimal comparison failure in sqlite3_test on 1.9.2-head state:resolved]
Signed-off-by: Carl Lerche carllerche@mac.com
http://github.com/rails/rails/commit/8e56085817e752bb361738ec6ca736...
