From: naruse@... Date: 2014-01-27T07:57:21+00:00 Subject: [ruby-core:60137] [Backport21 - Backport #9316] [Closed] BigDecimal division in Ruby 2.1 Issue #9316 has been updated by Yui NARUSE. Status changed from Assigned to Closed % Done changed from 0 to 100 Applied in changeset r44711. ---------- merge revision(s) 44588: [Backport #9316] * ext/bigdecimal/bigdecimal.c (BigDecimal_divide): Add an additional digit for the quotient to be compatible with bigdecimal 1.2.1 and the former. [ruby-core:59365] [#9316] [#9305] * test/bigdecimal/test_bigdecimal.rb: tests for the above change. * ext/bigdecimal/bigdecimal.gemspec: bigdecimal version 1.2.4. ---------------------------------------- Backport #9316: BigDecimal division in Ruby 2.1 https://bugs.ruby-lang.org/issues/9316#change-44631 * Author: Andre Bernardes * Status: Closed * Priority: Normal * Assignee: Yui NARUSE * Category: * Target version: * ruby -v: ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin13.0] ---------------------------------------- =begin When updating an app to Ruby 2.1, and I ran into the following difference between ruby 2.0.0-p353 and ruby 2.1.0 when dividing two BigDecimals: ((*Ruby 2.0.0p353:*)) 2.0.0p353 :002 > (BigDecimal.new("1472.0") / BigDecimal.new("0.99")).to_f => 1486.868686869 ((*Ruby 2.1.0p0:*)) 2.1.0p0 :006 > (BigDecimal.new("1472.0") / BigDecimal.new("0.99")).to_f => 1487.0 =end -- http://bugs.ruby-lang.org/