Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Don Wilson's latest activity

Wednesday, January 05 2011
6253 sqlite3 Float issue was updated in Ruby on Rails
  • Don Wilson
    • Title changed from sqlite3-ruby Float issue to sqlite3 Float issue
    by Don Wilson at 4:29 PM
  • Don Wilson
    Don Wilson created the ticket at 4:27 PM

    I'm submitting this for help collaborating on what should be done, if anything.

    Example of the issue

    Here, I am summing -40.25, 100, and -34.59 in the database:

    ...
Friday, December 17 2010
6182 Another rounding problem in number_with_precision was updated in Ruby on Rails
  • Don Wilson
    Don Wilson commented at 5:06 PM

    Good catch Piotr :)

    In certain cases in Ruby 1.8, BigDecimal / Float = Float. So, I just had to convert the other side to a BigDecimal before the division.

    Just...

Thursday, December 16 2010
6182 Another rounding problem in number_with_precision was created in Ruby on Rails
  • Don Wilson
    Don Wilson created the ticket at 8:03 PM

    Currently, if you run number_with_precision(9.995, :precision => 2) it returns "9.99". It should return "10.00". You can read a little more information here:

    h...

Tuesday, November 02 2010
5894 number_to_currency doesn't format negative numbers correctly was updated in Ruby on Rails
  • Don Wilson
    Don Wilson commented at 3:07 PM

    Good idea. I have included new patches with i18n tests!

  • Don Wilson
    Don Wilson commented at 4:16 AM

    OK, thanks for clarifying that for me. It makes sense now.

    I have squashed the patch into one commit and I attached a patch for master and another for 3-0-stabl...

Monday, November 01 2010
5894 number_to_currency doesn't format negative numbers correctly was updated in Ruby on Rails
  • Don Wilson
    Don Wilson commented at 3:10 PM

    Andrew, I'll definitely squash the patch into one commit. I realized I had done that after I uploaded it.

    I'm not sure what you mean by your other suggestion, t...

Sunday, October 31 2010
5894 number_to_currency doesn't format negative numbers correctly was updated in Ruby on Rails
  • Don Wilson
    Don Wilson commented at 3:41 PM

    Good idea. I have made that change. The negative format is now "-" + :format by default if a format is specified. Of course, if they specify :negative_format, t...

Saturday, October 30 2010
5894 number_to_currency doesn't format negative numbers correctly was updated in Ruby on Rails
  • Don Wilson
    Don Wilson commented at 8:26 AM

    Whoops, I should have put [PATCH] in the subject and I didn't.

  • Don Wilson
    Don Wilson created the ticket at 8:18 AM

    The Problem

    Right now, if you call number_to_currency(-1.23), it will return "$-1.23". This is not correct in most cases.

    Desired Output

    I have done a lot of re...