This project is archived and is in readonly mode.

#4871 ✓resolved
Rohit Arondekar

BigDecimal comparison failure in sqlite3_test on 1.9.2-head

Reported by Rohit Arondekar | June 16th, 2010 @ 01:54 PM

Active Record tests in Rails master on 1.9.2-head generated the following failure:

  1) Failure:
test_add_table_with_decimals(MigrationTest) [test/cases/migration_test.rb:1035]:
<#<BigDecimal:6b4a900,'0.2718281828 45905E1',27(27)>> expected but was
<#<BigDecimal:6b4a770,'0.2718281828 4590455E1',27(27)>>.

The assert that fails:

  assert_equal BigDecimal("2.71828182845905"), b.value_of_e

My guess is that the part of the code or the function in sqlite3-ruby that converts the float stored in the DB to a BigDecimal has higher precision in 1.9.2.

Ruby version: ruby 1.9.2dev (2010-06-06 revision 28184) [x86_64-linux]
sqlite3-ruby version: 1.3.0

Let me know if any more information is required.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Attachments

Referenced by

Pages