1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
Commit graph

4 commits

Author SHA1 Message Date
mrkn
dca0b41777 * ext/bigdecimal/lib/bigdecimal/util.rb (Rational#to_d):
zero or negative precision is error.  fixes #5098.
  [ruby-dev:44210]
* test/bigdecimal/test_bigdecimal_util.rb: add test for the above
  change.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-26 15:49:47 +00:00
mrkn
079fb8d4c3 * ext/bigdecimal/lib/bigdecimal/util.rb (Float#to_d): modified for
specifying precision.  fixes #5098.  [ruby-dev:44210]
* test/bigdecimal/test_bigdecimal_util.rb: add test for the above
  change.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-26 15:48:25 +00:00
mrkn
2fcb91c74c * ext/bigdecimal/lib/bigdecimal/util.rb (Integer#to_d): added
for symmetry to BigDecimal() function with an Integer.
  fixes #5098.  [ruby-dev:44210]
* test/bigdecimal/test_bigdecimal_util.rb: add test for the above
  change.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-26 15:46:42 +00:00
mrkn
5ba05758fe * ext/bigdecimal/lib/bigdecimal/util.rb (BigDecimal#to_d): added
for adapting other Numeric subclasses.  [ruby-dev:44245]
* test/bigdecimal/test_bigdecimal_util.rb: test for the above change.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-26 15:40:27 +00:00