Skip to content

Commit e803269

Browse files
authored
Merge pull request #18 from Paprikas/fix-argument-error-issue-13
#13 Rescue from ArgumentError when passing string into BigDecimal.new
2 parents 5dc2e5c + b9308df commit e803269

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/split/export.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ module Export
88

99
def round(number, precision = 2)
1010
BigDecimal.new(number.to_s).round(precision).to_f
11+
rescue ArgumentError
12+
0.0
1113
end
1214

1315
# this method calculates the z_score for an alternative including all goals. This behavior should

0 commit comments

Comments
 (0)