diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2018-12-21 10:28:06 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2018-12-21 10:28:06 +0900 |
commit | d5f8486d3f861f9848f4cd919fcdc33fe9f43dca (patch) | |
tree | 4d9127c93dc893c28cf15516b6a942603b6a4855 /activemodel/test/validators/namespace | |
parent | 1ff22133139b3c8aa4fb9b691b677aa0e697ea77 (diff) | |
download | rails-d5f8486d3f861f9848f4cd919fcdc33fe9f43dca.tar.gz rails-d5f8486d3f861f9848f4cd919fcdc33fe9f43dca.tar.bz2 rails-d5f8486d3f861f9848f4cd919fcdc33fe9f43dca.zip |
Use BigDecimal provided methods to convert String to BigDecimal
`String#to_d` does not raise an exception if an invalid value is specified.
So can remove exception handling.
```
$ bundle exec ruby -v -rbigdecimal -rbigdecimal/util -e 'p "123,003".to_d'
ruby 2.6.0dev (2018-12-21 trunk 66474) [x86_64-linux]
0.123e3
```
Diffstat (limited to 'activemodel/test/validators/namespace')
0 files changed, 0 insertions, 0 deletions