Commit graph

2 commits

Author SHA1 Message Date
mrkn
70d89f2c16 * ext/bigdecimal/lib/bigdecimal/util.rb (Rational#to_d):
revive zero and implicit precision support as a deprecated feature.
* test/bigdecimal/test_bigdecimal_util.rb: modify a test for the above
  change.
* NEWS: describes the above change.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-30 04:57:45 +00:00
mrkn
2621ba04cb Merge revisions 32676, 32677, 32679, 32680:
* ext/bigdecimal/lib/bigdecimal/util.rb (Rational#to_d):
      zero or negative precision is error.  fixes #5098.
      [ruby-dev:44210]
    * ext/bigdecimal/lib/bigdecimal/util.rb (Float#to_d): modified for
      specifying precision.  fixes #5098.  [ruby-dev:44210]
    * ext/bigdecimal/lib/bigdecimal/util.rb (Integer#to_d): added
      for symmetry to BigDecimal() function with an Integer.
      fixes #5098.  [ruby-dev:44210]
    * ext/bigdecimal/lib/bigdecimal/util.rb (BigDecimal#to_d): added
      for adapting other Numeric subclasses.  [ruby-dev:44245]
    * test/bigdecimal/test_bigdecimal_util.rb: add tests for the above
      changes.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-26 16:17:04 +00:00