From b2545e4106c8388cb2a4d9e06c31954e5ee2c948 Mon Sep 17 00:00:00 2001 From: Nick LaMuro Date: Mon, 23 Oct 2017 11:11:59 -0500 Subject: Deprecate ActiveSupport::Inflector#acronym_regex To be removed in Rails 6.0 (default for the deprecate helper). Code moved around as well for the ActiveSupport::Deprecation modules, since it was dependent on ActiveSupport::Inflector being loaded for it to work. By "lazy loading" the Inflector code from within the Deprecation code, we can require ActiveSupport::Deprecation from ActiveSupport::Inflector and not get a circular dependency issue. --- activesupport/test/inflector_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'activesupport/test') diff --git a/activesupport/test/inflector_test.rb b/activesupport/test/inflector_test.rb index eeec0ab1a5..ad2ec1d67d 100644 --- a/activesupport/test/inflector_test.rb +++ b/activesupport/test/inflector_test.rb @@ -224,6 +224,12 @@ class InflectorTest < ActiveSupport::TestCase assert_equal("json_html_api", ActiveSupport::Inflector.underscore("JSONHTMLAPI")) end + def test_acronym_regexp_is_deprecated + assert_deprecated do + ActiveSupport::Inflector.inflections.acronym_regex + end + end + def test_underscore CamelToUnderscore.each do |camel, underscore| assert_equal(underscore, ActiveSupport::Inflector.underscore(camel)) -- cgit v1.2.3