History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: JRUBY-909
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Charles Oliver Nutter
Reporter: Stuart Halloway
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
JRuby

BigDecimal to_s breaks Rails schema_dumper for decimal columns

Created: 01/May/07 09:32 PM   Updated: 06/May/07 09:49 PM
Component/s: Core Classes/Modules
Affects Version/s: JRuby 0.9.9
Fix Version/s: JRuby 1.0.0RC1

Time Tracking:
Not Specified

File Attachments: 1. File PartialBigDecimalFix.diff (3 kb)



 Description  « Hide
BigDecimal's to_s does not return the same value in jruby as in native Ruby: BigDecimal.new("0.0").to_s returns "0.0E0" instead of "0.0". This triggers a chain of events that causes Rails's schema_dumper to fail for any schema that includes a decimal column, which in turn causes rake to fail for tests.

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Stuart Halloway - 02/May/07 08:43 PM
This patch fixes the most urgent part of the BigDecimal#to_s bug (Rails tests depend on BigDecimal("0.0").to_s to generate source code to deal with defaults in database columns.)
The patch also includes TODOs to mark some additional work needed.

Charles Oliver Nutter - 02/May/07 10:44 PM
Committed in 3610. Thanks!

Charles Oliver Nutter - 06/May/07 09:49 PM
Closing for 1.0RC1