10000 Fix assersion for [Bug #9316] · ruby/bigdecimal@2e1dfd2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2e1dfd2

Browse files
committed
Fix assersion for [Bug #9316]
1 parent 74cd039 commit 2e1dfd2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/bigdecimal/test_bigdecimal.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -936,7 +936,9 @@ def test_div
936936
assert_equal(2, BigDecimal("2") / 1)
937937
assert_equal(-2, BigDecimal("2") / -1)
938938

939-
assert_not_equal(BigDecimal('1487.0'), BigDecimal('1472.0') / BigDecimal('0.99'), '[ruby-core:59365] [#9316]')
939+
assert_equal(BigDecimal('1486.868686869'),
940+
(BigDecimal('1472.0') / BigDecimal('0.99')).round(9),
941+
'[ruby-core:59365] [#9316]')
940942

941943
assert_in_delta(4.124045235,
942944
(BigDecimal('0.9932') / (700 * BigDecimal('0.344045') / BigDecimal('1000.0'))).round(9, half: :up),

0 commit comments

Comments
 (0)
0