From e12b2557682e7cbe18206c1e00a30cd83db19db7 Mon Sep 17 00:00:00 2001 From: greenbigfrog Date: Wed, 7 Feb 2018 17:16:35 +0100 Subject: [PATCH] Do not allocate memory useless --- src/pg_ext/big_decimal.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pg_ext/big_decimal.cr b/src/pg_ext/big_decimal.cr index 7e31626f..895f3b7c 100644 --- a/src/pg_ext/big_decimal.cr +++ b/src/pg_ext/big_decimal.cr @@ -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