aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/bigdecimal_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Remove BigDecimal#to_dDavid Celis2014-02-011-5/+0
| | | | | | This was backported for Ruby 1.8 support and is no longer needed. Signed-off-by: David Celis <me@davidcel.is>
* Don't require BigDecimal serialization extensionDavid Celis2014-02-011-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rails currently provides an extension to BigDecimal that redefines how it is serialized to YAML. However, as noted in #12467, this does not work as expected. When ActiveSupport is required, BigDecimal YAML serialization does not maintain the object type. It instead ends up serializing the number represented by the BigDecimal itself which, when loaded by YAML later, becomes a Float: ```ruby require 'yaml' require 'bigdecimal' yaml = BigDecimal('13.37').to_yaml YAML.load(yaml).class require 'active_support/all' yaml = BigDecimal('13.37').to_yaml YAML.load(yaml).class ``` @tenderlove posits that we should deprecate the custom BigDecimal serialization and let Ruby handle it. For the time being, users who require this serialization for backwards compatibility can manually `require 'active_support/core_ext/big_decimal/yaml_conversions'`. This will close #12467 and deprecate the custom BigDecimal#to_yaml. Signed-off-by: David Celis <me@davidcel.is>
* Removed unnecessary requireAnupam Choudhury2013-09-101-1/+0
|
* Moving NumberHelpers from ActionView to ActiveSupportAndrew Mutz2012-05-271-0/+5
|
* use AS::TestCase as the base classAaron Patterson2012-01-051-1/+1
|
* fixing psych support in big decimal, fixing tests to support YAML 1.1Aaron Patterson2011-01-211-4/+4
|
* Fixed various isolated test missing requires within AS.Josh Kalderimis2011-01-121-2/+4
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* adding to_d to BigDecimalAaron Patterson2011-01-101-0/+15