diff options
author | Koichi ITO <koic.ito@gmail.com> | 2023-11-06 22:31:31 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-11-07 05:32:49 +0000 |
commit | f0abe610a3a4d6d334402951d3abfa0185b958ef (patch) | |
tree | 3ee1bdbbdf9513bb17047c1e036216bfa620ee09 /ext | |
parent | 8ac6b2ec7d0b61f49d7438f35f46614e114f4700 (diff) | |
download | ruby-f0abe610a3a4d6d334402951d3abfa0185b958ef.tar.gz |
[ruby/bigdecimal] Update doc for bigdecimal/util
Follow up https://github.com/ruby/bigdecimal/issues/89.
`BigDecimal.new` has already been removed. This PR replaces `BigDecimal.new` with
`Kernel.BigDecimal` in the documentation, following the message below:
> BigDecimal.new is deprecated; use Kernel.BigDecimal method instead.
https://github.com/ruby/bigdecimal/commit/26d84ba766e971da8eaaf2ce41e7b89935fa68da
https://github.com/ruby/bigdecimal/commit/dd52adf3b2
Diffstat (limited to 'ext')
-rw-r--r-- | ext/bigdecimal/lib/bigdecimal/util.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/bigdecimal/lib/bigdecimal/util.rb b/ext/bigdecimal/lib/bigdecimal/util.rb index ad92f7cfe6..8bfc0ed8ed 100644 --- a/ext/bigdecimal/lib/bigdecimal/util.rb +++ b/ext/bigdecimal/lib/bigdecimal/util.rb @@ -18,7 +18,7 @@ class Integer < Numeric # # 42.to_d # => 0.42e2 # - # See also BigDecimal::new. + # See also Kernel.BigDecimal. # def to_d BigDecimal(self) @@ -45,7 +45,7 @@ class Float < Numeric # 1.234.to_d # => 0.1234e1 # 1.234.to_d(2) # => 0.12e1 # - # See also BigDecimal::new. + # See also Kernel.BigDecimal. # def to_d(precision=0) BigDecimal(self, precision) @@ -67,7 +67,7 @@ class String # "123.45e1".to_d # => 0.12345e4 # "45.67 degrees".to_d # => 0.4567e2 # - # See also BigDecimal::new. + # See also Kernel.BigDecimal. # def to_d BigDecimal.interpret_loosely(self) @@ -127,7 +127,7 @@ class Rational < Numeric # # Rational(22, 7).to_d(3) # => 0.314e1 # - # See also BigDecimal::new. + # See also Kernel.BigDecimal. # def to_d(precision) BigDecimal(self, precision) @@ -152,7 +152,7 @@ class Complex < Numeric # Complex(0.1234567, 0).to_d(4) # => 0.1235e0 # Complex(Rational(22, 7), 0).to_d(3) # => 0.314e1 # - # See also BigDecimal::new. + # See also Kernel.BigDecimal. # def to_d(*args) BigDecimal(self) unless self.imag.zero? # to raise eerror |