Skip to content

Commit

Permalink
Do not allocate memory useless
Browse files Browse the repository at this point in the history
  • Loading branch information
greenbigfrog committed Feb 7, 2018
1 parent 4f81c1a commit a4be24c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pg_ext/big_decimal.cr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module PG
struct Numeric
# Returns a BigDecimal representation of the numeric. This retains all precision.
def to_big_d
return BigDecimal.new("0") if nan? || ndigits == 0
return BigDecimal.new(0) if nan? || ndigits == 0
BigDecimal.new(to_s)
end
end
Expand Down

0 comments on commit a4be24c

Please sign in to comment.