This project is archived and is in readonly mode.

#1763 ✓resolved
Georg Ledermann

number_to_human_size fails for some values

Reported by Georg Ledermann | January 15th, 2009 @ 06:03 PM | in 2.3.6

For some values, the helper method "number_to_human_size" gives a wrong result. See this examples:

Correct:

number_to_human_size(41500, :precision => 0)
=> "41 KB"

Wrong:

number_to_human_size(41100, :precision => 0)
=> "4 KB"

My Environment: * ruby 1.8.6 (2007-09-24 patchlevel 111) [i686-darwin9.1.0] * Rails 2.2.2

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Attachments

Referenced by

Pages