diff options
author | mrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-12-21 15:35:29 +0000 |
---|---|---|
committer | mrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-12-21 15:35:29 +0000 |
commit | bd288dcc8bd661b51856e95a9d649a1130580627 (patch) | |
tree | 784a027c1e25467e66113278df99ccb0faed11a5 /ext/bigdecimal/lib/bigdecimal/util.rb | |
parent | 4f618f5a0089af89069d6c547f8e4c4dc0a85410 (diff) |
bigdecimal: version 1.3.0
Import bigdecimal version 1.3.0. The full commit log is here:
https://github.com/ruby/bigdecimal/compare/v1.3.0.pre.2...v1.3.0
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/bigdecimal/lib/bigdecimal/util.rb')
-rw-r--r-- | ext/bigdecimal/lib/bigdecimal/util.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/bigdecimal/lib/bigdecimal/util.rb b/ext/bigdecimal/lib/bigdecimal/util.rb index 79e0ebde8b..670a625563 100644 --- a/ext/bigdecimal/lib/bigdecimal/util.rb +++ b/ext/bigdecimal/lib/bigdecimal/util.rb @@ -13,7 +13,7 @@ class Integer < Numeric # require 'bigdecimal/util' # # 42.to_d - # # => #<BigDecimal:1008ef070,'0.42E2',9(36)> + # # => 0.42e2 # def to_d BigDecimal(self) @@ -34,7 +34,7 @@ class Float < Numeric # require 'bigdecimal/util' # # 0.5.to_d - # # => #<BigDecimal:1dc69e0,'0.5E0',9(18)> + # # => 0.5e0 # def to_d(precision=nil) BigDecimal(self, precision || Float::DIG) @@ -55,7 +55,7 @@ class String # require 'bigdecimal/util' # # "0.5".to_d - # # => #<BigDecimal:1dc69e0,'0.5E0',9(18)> + # # => 0.5e0 # def to_d BigDecimal(self) @@ -117,7 +117,7 @@ class Rational < Numeric # r = (22/7.0).to_r # # => (7077085128725065/2251799813685248) # r.to_d(3) - # # => #<BigDecimal:1a44d08,'0.314E1',18(36)> + # # => 0.314e1 def to_d(precision) if precision <= 0 raise ArgumentError, "negative precision" |