Inflections#plurals, singulars, uncountables, humans, acronyms are public attr_readers

This commit is contained in:
Akira Matsuda 2020-10-02 15:17:18 +09:00
parent 2b2ed7bc0e
commit 494c0429b7
2 changed files with 2 additions and 2 deletions

View File

@ -76,7 +76,7 @@ module ActiveSupport
# Private, for the test suite.
def initialize_dup(orig) # :nodoc:
%w(plurals singulars uncountables humans acronyms).each do |scope|
instance_variable_set("@#{scope}", orig.send(scope).dup)
instance_variable_set("@#{scope}", orig.public_send(scope).dup)
end
define_acronym_regex_patterns
end

View File

@ -560,7 +560,7 @@ class InflectorTest < ActiveSupport::TestCase
# clear the inflections
ActiveSupport::Inflector.inflections do |inflect|
inflect.clear(scope)
assert_equal [], inflect.send(scope)
assert_equal [], inflect.public_send(scope)
end
end
end