aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/big_decimal
Commit message (Collapse)AuthorAgeFilesLines
* Unify behavior of all Numeric extensions and use Module.prepend instead of ↵Bernard Potocki2015-05-281-8/+7
| | | | alias_method
* Remove deprecated core_ext/big_decimal/yaml_conversions fileRafael Mendonça França2015-01-041-14/+0
|
* Prevent Numeric#to_s from allocating an arrayJean Boussier2014-11-281-7/+6
|
* Fix isolated testsRafael Mendonça França2014-02-011-0/+1
|
* Remove BigDecimal#to_dDavid Celis2014-02-011-7/+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-012-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* add require to suppress warning; remove variableVipul A M2013-04-041-0/+1
|
* Moving NumberHelpers from ActionView to ActiveSupportAndrew Mutz2012-05-271-2/+7
|
* No need to override the to_yaml method in BigDecimalRafael Mendonça França2012-01-041-15/+0
|
* No need to use rescue block to require psychRafael Mendonça França2012-01-041-6/+1
|
* No need to check if YAML::ENGINE is defined since ruby 1.9 does thatRafael Mendonça França2012-01-041-1/+1
|
* only backport the to_d method if it does not existAaron Patterson2011-08-241-2/+5
|
* Remove unneeded yaml_as declarationbrainopia2011-01-281-2/+0
|
* prefering psych as the yaml parser if possible, fixing assertions for YAML ↵Aaron Patterson2011-01-211-0/+6
| | | | 1.1 compatibility
* fixing psych support in big decimal, fixing tests to support YAML 1.1Aaron Patterson2011-01-211-0/+7
|
* adding to_d to BigDecimalAaron Patterson2011-01-101-0/+4
|
* Convert bigdecimal extension modules to class reopensJeremy Kemper2009-03-211-30/+20
|
* * Introduce ActiveSupport.core_ext Integer, %w(conversions time etc)Jeremy Kemper2009-03-211-0/+37
* Convert some extension modules to simply reopening the class * Remove deprecated Float time extensions * Fold Base64 extension into ActiveSupport::Base64 since stdlib Base64 is gone