activerecord-jdbc
  1. activerecord-jdbc
  2. ACTIVERECORD_JDBC-113

Different Precision in MRI and JRuby when deserializing Float column

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.5
    • Fix Version/s: 1.0.0
    • Component/s: PostgreSQL
    • Labels:
      None
    • Environment:

      JRuby 1.5.0.RC2
      activerecord-jdbc-adapter (master)

      in comparison to Ruby 1.8.7
      activerecord 2.3.5
      postgres-pr 0.6.3

      Description

      When executing the Redmine test suite, I stumbled upon the following incompatibility. When storing a float value, it is load with a different precision, than it was stored. It occurs in Redmine's sources in test/functional/timelog_controller_test.rb:92

      I have extracted the bug into a simple test case for activerecord-jdbc-adapter. The test passes in MRI and fails using JRuby. It may be found attached or on GitHub.

        Activity

        Hide
        Nick Sieger added a comment -

        Fixed in e3bf6f58.

        Show
        Nick Sieger added a comment - Fixed in e3bf6f58.

          People

          • Assignee:
            Nick Sieger
            Reporter:
            Gregor Schmidt
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: