From: "Hanmac (Hans Mackowiak)" Date: 2013-12-05T01:57:34+09:00 Subject: [ruby-core:58858] [ruby-trunk - Bug #9214][Open] BigDecimal: BigDecimal() and to_d does not always make currect for -0.0 Issue #9214 has been reported by Hanmac (Hans Mackowiak). ---------------------------------------- Bug #9214: BigDecimal: BigDecimal() and to_d does not always make currect for -0.0 https://bugs.ruby-lang.org/issues/9214 Author: Hanmac (Hans Mackowiak) Status: Open Priority: Normal Assignee: Category: lib Target version: ruby -v: ruby 2.1.0dev (2013-11-28 trunk 43903) [x86_64-linux] Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN BigDecimal does not always works currect for -0.0 BigDecimal("-0.0") => # BigDecimal(-0.0,0) => # (-0.0).to_d => # i think the problem is related to #8265 because currently there is no nice way to check for -0.0 because equal? can not check it -- http://bugs.ruby-lang.org/