From 077e4b97d5a86c54940de0a820aff9a7fe090467 Mon Sep 17 00:00:00 2001 From: prepor Date: Mon, 2 Mar 2020 15:08:51 +0100 Subject: [PATCH] .toByteArray for BigInteger & BigInt --- src/valuehash/impl.clj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/valuehash/impl.clj b/src/valuehash/impl.clj index ed839b5..463d857 100644 --- a/src/valuehash/impl.clj +++ b/src/valuehash/impl.clj @@ -66,9 +66,9 @@ clojure.lang.Ratio (to-byte-array [this] (long->bytes (Double/doubleToLongBits (double this)))) clojure.lang.BigInt - (to-byte-array [this] (long->bytes (Double/doubleToLongBits (double this)))) + (to-byte-array [this] (.toByteArray (.toBigInteger this))) BigInteger - (to-byte-array [this] (long->bytes (Double/doubleToLongBits (double this)))) + (to-byte-array [this] (.toByteArray this)) BigDecimal (to-byte-array [this] (long->bytes (Double/doubleToLongBits (double this)))) Boolean