summaryrefslogtreecommitdiff
path: root/ext/bigdecimal/lib
diff options
context:
space:
mode:
authormrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-04 06:37:44 +0000
committermrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-04 06:37:44 +0000
commit1699396fe502d929ced019dc0dd3463a35fbf6d3 (patch)
tree53749c797246de19f82c3d710ec1f753e01d6315 /ext/bigdecimal/lib
parentdd87e463106ade202e3b04e7703a91e438c027d6 (diff)
* ext/bigdecimal/lib/bigdecimal/util.rb (Float#to_d): fix the number
of figures. Patch by Vipul A M <vipulnsward@gmail.com>. https://github.com/ruby/ruby/pull/323 fix GH-323 * test/bigdecimal/test_bigdecimal_util.rb: fix for the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/bigdecimal/lib')
-rw-r--r--ext/bigdecimal/lib/bigdecimal/util.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/bigdecimal/lib/bigdecimal/util.rb b/ext/bigdecimal/lib/bigdecimal/util.rb
index b27e64c..bd02ef4 100644
--- a/ext/bigdecimal/lib/bigdecimal/util.rb
+++ b/ext/bigdecimal/lib/bigdecimal/util.rb
@@ -28,7 +28,7 @@ class Float < Numeric
# # => #<BigDecimal:1dc69e0,'0.5E0',9(18)>
#
def to_d(precision=nil)
- BigDecimal(self, precision || Float::DIG+1)
+ BigDecimal(self, precision || Float::DIG)
end
end