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 /actionpack/test | |
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 'actionpack/test')
-rw-r--r-- | actionpack/test/dispatch/request_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/test/dispatch/request_test.rb b/actionpack/test/dispatch/request_test.rb index 2a18395aac..8661dc56d6 100644 --- a/actionpack/test/dispatch/request_test.rb +++ b/actionpack/test/dispatch/request_test.rb @@ -763,7 +763,7 @@ class RequestMethod < BaseRequestTest test "post uneffected by local inflections" do existing_acronyms = ActiveSupport::Inflector.inflections.acronyms.dup - existing_acronym_regex = ActiveSupport::Inflector.inflections.acronym_regex.dup + assert_deprecated { ActiveSupport::Inflector.inflections.acronym_regex.dup } begin ActiveSupport::Inflector.inflections do |inflect| inflect.acronym "POS" @@ -777,7 +777,7 @@ class RequestMethod < BaseRequestTest # Reset original acronym set ActiveSupport::Inflector.inflections do |inflect| inflect.send(:instance_variable_set, "@acronyms", existing_acronyms) - inflect.send(:instance_variable_set, "@acronym_regex", existing_acronym_regex) + inflect.send(:define_acronym_regex_patterns) end end end |