aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/number_helper/rounding_helper.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/number_helper/rounding_helper.rb b/activesupport/lib/active_support/number_helper/rounding_helper.rb
index d9644df17d..63b48444a6 100644
--- a/activesupport/lib/active_support/number_helper/rounding_helper.rb
+++ b/activesupport/lib/active_support/number_helper/rounding_helper.rb
@@ -40,11 +40,11 @@ module ActiveSupport
def convert_to_decimal(number)
case number
when Float, String
- number = BigDecimal(number.to_s)
+ BigDecimal(number.to_s)
when Rational
- number = BigDecimal(number, digit_count(number.to_i) + precision)
+ BigDecimal(number, digit_count(number.to_i) + precision)
else
- number = number.to_d
+ number.to_d
end
end