Skip to content

Commit a1a8a74

Browse files
authored
Merge pull request #551 from agraves/ag-squelch-bigdecimal-warning
Fix Bigdecimal warnings
2 parents 27cf04c + 4a4f202 commit a1a8a74

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/split/dashboard/helpers.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ def number_to_percentage(number, precision = 2)
1919

2020
def round(number, precision = 2)
2121
begin
22-
BigDecimal.new(number.to_s)
22+
BigDecimal(number.to_s)
2323
rescue ArgumentError
24-
BigDecimal.new(0)
24+
BigDecimal(0)
2525
end.round(precision).to_f
2626
end
2727

0 commit comments

Comments
 (0)