diff options
author | Matthew Draper <matthew@trebex.net> | 2017-11-14 11:10:16 +1030 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-14 11:10:16 +1030 |
commit | 52483d3fa0f6748fa99a9f2184b2d29cb2ce99a4 (patch) | |
tree | 782c11b2f9fb716ee62e7eb8bb653eaa0c77b5a8 /activesupport/test/inflector_test.rb | |
parent | 8fad56c6a7d31c629e09b0583b1698278d38f964 (diff) | |
parent | b2545e4106c8388cb2a4d9e06c31954e5ee2c948 (diff) | |
download | rails-52483d3fa0f6748fa99a9f2184b2d29cb2ce99a4.tar.gz rails-52483d3fa0f6748fa99a9f2184b2d29cb2ce99a4.tar.bz2 rails-52483d3fa0f6748fa99a9f2184b2d29cb2ce99a4.zip |
Merge pull request #30782 from NickLaMuro/improve_performance_of_inflections
Cache regexps generated from acronym_regex
Diffstat (limited to 'activesupport/test/inflector_test.rb')
-rw-r--r-- | activesupport/test/inflector_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activesupport/test/inflector_test.rb b/activesupport/test/inflector_test.rb index 6cc1039d8e..0e3e576a70 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)) |