From 98ea19925d6db642731741c3b91bd085fac92241 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Fri, 2 Jan 2015 21:57:59 -0300 Subject: Remove deprecated core_ext/big_decimal/yaml_conversions file --- activesupport/CHANGELOG.md | 5 +++++ .../core_ext/big_decimal/yaml_conversions.rb | 14 -------------- .../test/core_ext/big_decimal/yaml_conversions_test.rb | 11 ----------- 3 files changed, 5 insertions(+), 25 deletions(-) delete mode 100644 activesupport/lib/active_support/core_ext/big_decimal/yaml_conversions.rb delete mode 100644 activesupport/test/core_ext/big_decimal/yaml_conversions_test.rb diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md index 0f94d1e67e..89b3fb8782 100644 --- a/activesupport/CHANGELOG.md +++ b/activesupport/CHANGELOG.md @@ -1,3 +1,8 @@ +* Remove deprecated `active_support/core_ext/big_decimal/yaml_conversions` + file. + + *Rafael Mendonça França* + * Remove deprecated methods `ActiveSupport::Cache::Store.instrument` and `ActiveSupport::Cache::Store.instrument=`. diff --git a/activesupport/lib/active_support/core_ext/big_decimal/yaml_conversions.rb b/activesupport/lib/active_support/core_ext/big_decimal/yaml_conversions.rb deleted file mode 100644 index 46ba93ead4..0000000000 --- a/activesupport/lib/active_support/core_ext/big_decimal/yaml_conversions.rb +++ /dev/null @@ -1,14 +0,0 @@ -ActiveSupport::Deprecation.warn 'core_ext/big_decimal/yaml_conversions is deprecated and will be removed in the future.' - -require 'bigdecimal' -require 'yaml' -require 'active_support/core_ext/big_decimal/conversions' - -class BigDecimal - YAML_MAPPING = { 'Infinity' => '.Inf', '-Infinity' => '-.Inf', 'NaN' => '.NaN' } - - def encode_with(coder) - string = to_s - coder.represent_scalar(nil, YAML_MAPPING[string] || string) - end -end diff --git a/activesupport/test/core_ext/big_decimal/yaml_conversions_test.rb b/activesupport/test/core_ext/big_decimal/yaml_conversions_test.rb deleted file mode 100644 index e634679d20..0000000000 --- a/activesupport/test/core_ext/big_decimal/yaml_conversions_test.rb +++ /dev/null @@ -1,11 +0,0 @@ -require 'abstract_unit' - -class BigDecimalYamlConversionsTest < ActiveSupport::TestCase - def test_to_yaml - assert_deprecated { require 'active_support/core_ext/big_decimal/yaml_conversions' } - assert_match("--- 100000.30020320320000000000000000000000000000001\n", BigDecimal.new('100000.30020320320000000000000000000000000000001').to_yaml) - assert_match("--- .Inf\n", BigDecimal.new('Infinity').to_yaml) - assert_match("--- .NaN\n", BigDecimal.new('NaN').to_yaml) - assert_match("--- -.Inf\n", BigDecimal.new('-Infinity').to_yaml) - end -end -- cgit v1.2.3