未验证 提交 08304732 编写于 作者: R Rafael França 提交者: GitHub

Merge pull request #38384 from tjschuck/cannot_cannot_be_can_not_pt_2

Change all "can not"s to the correct "cannot"
......@@ -19,7 +19,7 @@ def run
end
else
# Custom preload scope is used and
# the association can not be marked as loaded
# the association cannot be marked as loaded
# Loading into a Hash instead
records_by_owner
end
......
......@@ -64,7 +64,7 @@ module Inflector
def transliterate(string, replacement = "?", locale: nil)
string = string.dup if string.frozen?
raise ArgumentError, "Can only transliterate strings. Received #{string.class.name}" unless string.is_a?(String)
raise ArgumentError, "Can not transliterate strings with #{string.encoding} encoding" unless ALLOWED_ENCODINGS_FOR_TRANSLITERATE.include?(string.encoding)
raise ArgumentError, "Cannot transliterate strings with #{string.encoding} encoding" unless ALLOWED_ENCODINGS_FOR_TRANSLITERATE.include?(string.encoding)
input_encoding = string.encoding
......
......@@ -88,7 +88,7 @@ def test_transliterate_handles_strings_with_incompatible_encodings
exception = assert_raises ArgumentError do
ActiveSupport::Inflector.transliterate(string)
end
assert_equal "Can not transliterate strings with #{encoding} encoding", exception.message
assert_equal "Cannot transliterate strings with #{encoding} encoding", exception.message
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册