BigDecimal Issue in Rails 3.1.1 Environment
-------------------------------------------

                 Key: JRUBY-6160
                 URL: https://jira.codehaus.org/browse/JRUBY-6160
             Project: JRuby
          Issue Type: Bug
          Components: Ruby 1.9.2
    Affects Versions: JRuby 1.6.4, JRuby 1.6.5
         Environment: Solaris 11_EA (svn_173);Java 1.6.0_29-b11
            Reporter: Hirankit Tantirapan
            Assignee: Thomas E Enebo


Given a sqlite3 database as follow:

sqlite> SELECT * FROM Products;
1|CoffeeScript|<p>
        CoffeeScript is JavaScript done right. It provides all of JavaScript's
        functionality wrapped in a cleaner, more succinct syntax. In the first
        book on this exciting new language, CoffeeScript guru Trevor Burnham
        shows you how to hold onto all the power and flexibility of JavaScript
        while writing clearer, cleaner, and safer code.
      </p>|cs.jpg|36|2011-10-26 13:40:27.668000|2011-10-26 13:40:27.668000
2|Programming Ruby 1.9|<p>
        Ruby is the fastest growing and most exciting dynamic language
        out there. If you need to get working programs delivered fast,
        you should add Ruby to your toolbox.
      </p>|ruby.jpg|49.95|2011-10-26 13:40:27.760000|2011-10-26 13:40:27.760000
3|Rails Test Prescriptions|<p>
        <em>Rails Test Prescriptions</em> is a comprehensive guide to testing
        Rails applications, covering Test-Driven Development from both a
        theoretical perspective (why to test) and from a practical perspective
        (how to test effectively). It covers the core Rails testing tools and
        procedures for Rails 2 and Rails 3, and introduces popular add-ons,
        including Cucumber, Shoulda, Machinist, Mocha, and Rcov.
      </p>|rtp.jpg|34.95|2011-10-26 13:40:27.828000|2011-10-26 13:40:27.828000


In Rails 3.1.1 Console:

irb(main):001:0> Product.all[2].price
   (4.0ms)   SELECT name
 FROM sqlite_master
 WHERE type = 'table' AND NOT name = 'sqlite_sequence'

  Product Load (6.0ms)  SELECT "products".* FROM "products"
=> #<BigDecimal:1be71fd,'0.0',1(4)>
irb(main):002:0> Product.find(2).price
  Product Load (16.0ms)  SELECT "products".* FROM "products" WHERE 
"products"."id" = 2 LIMIT 1
=> #<BigDecimal:4686bc,'49.95',4(8)>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to