aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2017-12-15 10:57:53 +0900
committerGitHub <noreply@github.com>2017-12-15 10:57:53 +0900
commit67b9dbcc1cfce6694ab18c9629b233979506fbf0 (patch)
treee3123654767a935bb5e9feb32f5f27720525570c /guides/source
parent36291970341057bbf5f818d5ee0c5e77ab14a308 (diff)
parente4a6a23aa77185127ce9609777820fab14a689bb (diff)
downloadrails-67b9dbcc1cfce6694ab18c9629b233979506fbf0.tar.gz
rails-67b9dbcc1cfce6694ab18c9629b233979506fbf0.tar.bz2
rails-67b9dbcc1cfce6694ab18c9629b233979506fbf0.zip
Merge pull request #31460 from yahonda/deprecated_bigdecimal_new_ap_av_aj_as_guides
Suppress `warning: BigDecimal.new is deprecated`
Diffstat (limited to 'guides/source')
-rw-r--r--guides/source/active_support_core_extensions.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/guides/source/active_support_core_extensions.md b/guides/source/active_support_core_extensions.md
index 66d2fbd939..8e2826bb85 100644
--- a/guides/source/active_support_core_extensions.md
+++ b/guides/source/active_support_core_extensions.md
@@ -1978,19 +1978,19 @@ Extensions to `BigDecimal`
The method `to_s` provides a default specifier of "F". This means that a simple call to `to_s` will result in floating point representation instead of engineering notation:
```ruby
-BigDecimal.new(5.00, 6).to_s # => "5.0"
+BigDecimal(5.00, 6).to_s # => "5.0"
```
and that symbol specifiers are also supported:
```ruby
-BigDecimal.new(5.00, 6).to_s(:db) # => "5.0"
+BigDecimal(5.00, 6).to_s(:db) # => "5.0"
```
Engineering notation is still supported:
```ruby
-BigDecimal.new(5.00, 6).to_s("e") # => "0.5E1"
+BigDecimal(5.00, 6).to_s("e") # => "0.5E1"
```
Extensions to `Enumerable`