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.

Ben Sharpe's latest activity

Thursday, September 02 2010
5532 [patch] number_to_human(0) causes exception was updated in Ruby on Rails
  • Ben Sharpe
    • Title changed from number_to_human(0) causes exception to [patch] number_to_human(0) causes exception
    by Ben Sharpe at 4:13 PM
  • Ben Sharpe
    • Tag changed from patch actionpack number_helper to actionpack, number_helper, patch, rails3
    by Ben Sharpe at 4:11 PM
  • Ben Sharpe
    • Tag set to patch actionpack number_helper
    by Ben Sharpe at 4:10 PM
  • Ben Sharpe
    Ben Sharpe commented at 4:07 PM

    Here's patch with a test.

  • Ben Sharpe
    Ben Sharpe created the ticket at 2:52 PM

    number_to_human(0) causes a FloatDomainError

    The offending line appears to be line 462 in number_helper.rb

       number_exponent = Math.log10(number).floor
    

    Math...