aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2019-01-15 17:02:22 -0500
committerRafael Mendonça França <rafaelmfranca@gmail.com>2019-01-17 16:08:33 -0500
commit0ce67d3cd6d1b7b9576b07fecae3dd5b422a5689 (patch)
treeb94dfc8450a782d99523c242e5bda269dbef390d
parent6c745b0c5152a4437163a67707e02f4464493983 (diff)
downloadrails-0ce67d3cd6d1b7b9576b07fecae3dd5b422a5689.tar.gz
rails-0ce67d3cd6d1b7b9576b07fecae3dd5b422a5689.tar.bz2
rails-0ce67d3cd6d1b7b9576b07fecae3dd5b422a5689.zip
Remove deprecated `#acronym_regex` method from `Inflections`
-rw-r--r--actionpack/test/dispatch/request_test.rb1
-rw-r--r--activesupport/CHANGELOG.md4
-rw-r--r--activesupport/lib/active_support/inflector/inflections.rb3
-rw-r--r--activesupport/test/inflector_test.rb6
4 files changed, 5 insertions, 9 deletions
diff --git a/actionpack/test/dispatch/request_test.rb b/actionpack/test/dispatch/request_test.rb
index 9d1246b3a4..2a4d59affe 100644
--- a/actionpack/test/dispatch/request_test.rb
+++ b/actionpack/test/dispatch/request_test.rb
@@ -763,7 +763,6 @@ class RequestMethod < BaseRequestTest
test "post uneffected by local inflections" do
existing_acronyms = ActiveSupport::Inflector.inflections.acronyms.dup
- assert_deprecated { ActiveSupport::Inflector.inflections.acronym_regex.dup }
begin
ActiveSupport::Inflector.inflections do |inflect|
inflect.acronym "POS"
diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md
index d4eaee9f6d..7f413ccf6e 100644
--- a/activesupport/CHANGELOG.md
+++ b/activesupport/CHANGELOG.md
@@ -1,3 +1,7 @@
+* Remove deprecated `#acronym_regex` method from `Inflections`.
+
+ *Rafael Mendonça França*
+
* Fix `String#safe_constantize` throwing a `LoadError` for incorrectly cased constant references.
*Keenan Brock*
diff --git a/activesupport/lib/active_support/inflector/inflections.rb b/activesupport/lib/active_support/inflector/inflections.rb
index fa087c4dd6..88cdd99dbd 100644
--- a/activesupport/lib/active_support/inflector/inflections.rb
+++ b/activesupport/lib/active_support/inflector/inflections.rb
@@ -65,8 +65,7 @@ module ActiveSupport
@__instance__[locale] ||= new
end
- attr_reader :plurals, :singulars, :uncountables, :humans, :acronyms, :acronym_regex
- deprecate :acronym_regex
+ attr_reader :plurals, :singulars, :uncountables, :humans, :acronyms
attr_reader :acronyms_camelize_regex, :acronyms_underscore_regex # :nodoc:
diff --git a/activesupport/test/inflector_test.rb b/activesupport/test/inflector_test.rb
index 5e50acf5db..c3e1faff5d 100644
--- a/activesupport/test/inflector_test.rb
+++ b/activesupport/test/inflector_test.rb
@@ -224,12 +224,6 @@ 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))