Skip to content

Commit

Permalink
Remove deprecated #acronym_regex method from Inflections
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelfranca committed Jan 17, 2019
1 parent 6c745b0 commit 0ce67d3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
1 change: 0 additions & 1 deletion actionpack/test/dispatch/request_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 4 additions & 0 deletions activesupport/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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*
Expand Down
3 changes: 1 addition & 2 deletions activesupport/lib/active_support/inflector/inflections.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ def self.instance(locale = :en)
@__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:

Expand Down
6 changes: 0 additions & 6 deletions activesupport/test/inflector_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,6 @@ def test_underscore_acronym_sequence
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))
Expand Down

0 comments on commit 0ce67d3

Please sign in to comment.