aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/cache/null_store.rb
diff options
context:
space:
mode:
authorChris Salzberg <chris@dejimata.com>2019-04-17 21:08:11 +0900
committerChris Salzberg <chris@dejimata.com>2019-05-31 12:55:59 +0900
commitdd0357aeb85b6466dea97800c9f45cb6080f1324 (patch)
tree4c5820da03e35048ea6b7c906358d02ebeb817dc /activesupport/lib/active_support/cache/null_store.rb
parent5ce1f66d7ac50492f4cd1e6bd0170b2c888ec73d (diff)
downloadrails-dd0357aeb85b6466dea97800c9f45cb6080f1324.tar.gz
rails-dd0357aeb85b6466dea97800c9f45cb6080f1324.tar.bz2
rails-dd0357aeb85b6466dea97800c9f45cb6080f1324.zip
Make plain matcher match first, not last
This code takes the "plain" matcher with no prefix and suffix and puts it at the end of the matchers array such that it is de-prioritized among all matchers. The comment explaining this code, originally from commimt 8b8b7143efe dated in 2011, is in a context where detection from matchers happened immediately. In that situation, the plain matcher would indeed always match first and no others would ever be used. However, the current code does not immediately detect one match but rather maps matchers to matches for the method_name. Detection only happens for matches whose attribute name is valid. In this context, there is no need to bump the plain matcher to the end of the array, since it will only be selected if the attribute name it catpures matches a valid attribute name.
Diffstat (limited to 'activesupport/lib/active_support/cache/null_store.rb')
0 files changed, 0 insertions, 0 deletions