diff --git a/lib/money/money/allocation.rb b/lib/money/money/allocation.rb index 6e47b2d279..1792490bfe 100644 --- a/lib/money/money/allocation.rb +++ b/lib/money/money/allocation.rb @@ -42,9 +42,9 @@ def self.generate(amount, parts, whole_amounts = true) ## round-robin allocation of any remaining pennies if result.size > 0 - while remaining_amount != 0 - index = 0 + index = 0 + while remaining_amount != 0 amount_to_distribute = [1, remaining_amount.abs].min if remaining_amount > 0