This project is archived and is in readonly mode.
number_to_human_size fails for some values
-
Georg Ledermann
- Tag changed from 2.2.2, helper, numberhelper, number_to_human_size to 2.2.2, helper, numberhelper, number_to_human_size, patch
Here it's little patch to fix the bug (with tests added). It's a kind of a hack, perhaps someone can find a better way to fix this.
-
Travis Briggs
I fixed this with a different approach, fixing the regex itself. The previous regex was misleading, because since the #{escaped_separator} was inside a zero or one group (ie ()?), it would match trailing zeros after any digit.
I think this is a bit simpler fix, without special casing.
-
Repository
- State changed from new to resolved
(from [98eaa2c6834e418959f2a1a18421e4811167e03b]) Ensure number_to_human_size does not strip zeros from the end [#1763 number_to_human_size fails for some values state:resolved]
Signed-off-by: Pratik Naik pratiknaik@gmail.com
http://github.com/rails/rails/commit/98eaa2c6834e418959f2a1a18421e4... -
Bira
This also affects 2-3-stable (and thus 2.3.4). Would it be possible to apply this patch to that branch as well?
-
Michael Koziarski
- Milestone changed from 2.x to 2.3.6
- State changed from resolved to open
- Assigned user set to Pratik
-
Repository
- State changed from open to resolved
(from [eb30c695444b904d7937c8c12c59da9a8c4d60e5]) Ensure number_to_human_size does not strip zeros from the end [#1763 number_to_human_size fails for some values state:resolved]
Signed-off-by: Pratik Naik pratiknaik@gmail.com
http://github.com/rails/rails/commit/eb30c695444b904d7937c8c12c59da...
