ruby-changes:23570
From: naruse <ko1@a...>
Date: Fri, 11 May 2012 23:03:47 +0900 (JST)
Subject: [ruby-changes:23570] naruse:r35621 (trunk): Add a test: BigDecimal("0").div(BigDecimal("Infinity")).
naruse 2012-05-11 23:03:38 +0900 (Fri, 11 May 2012) New Revision: 35621 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=35621 Log: Add a test: BigDecimal("0").div(BigDecimal("Infinity")). Modified files: trunk/test/bigdecimal/test_bigdecimal.rb Index: test/bigdecimal/test_bigdecimal.rb =================================================================== --- test/bigdecimal/test_bigdecimal.rb (revision 35620) +++ test/bigdecimal/test_bigdecimal.rb (revision 35621) @@ -668,6 +668,10 @@ assert_equal(400000000000000000000000000000, x.div(3, 1)) assert_equal(420000000000000000000000000000, x.div(3, 2)) assert_equal(423000000000000000000000000000, x.div(3, 3)) + BigDecimal.save_exception_mode do + BigDecimal.mode(BigDecimal::EXCEPTION_INFINITY, false) + assert_equal(0, BigDecimal("0").div(BigDecimal("Infinity"))) + end end def test_abs_bigdecimal -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/