From 6af50a90671e0a713da929bf83ec641f4552335e Mon Sep 17 00:00:00 2001 From: "T.J. Schuck" Date: Tue, 4 Feb 2020 16:46:55 -0500 Subject: [PATCH] Change all "can not"s to the correct "cannot" It's been 6 years since [the original](https://github.com/rails/rails/pull/13584), so we're overdue for a sequel. The correct word is "cannot", one word, not "can not", two words. --- .../lib/active_record/associations/preloader/association.rb | 2 +- activesupport/lib/active_support/inflector/transliterate.rb | 2 +- activesupport/test/transliterate_test.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/activerecord/lib/active_record/associations/preloader/association.rb b/activerecord/lib/active_record/associations/preloader/association.rb index e4e1b6be5e..8d622f0239 100644 --- a/activerecord/lib/active_record/associations/preloader/association.rb +++ b/activerecord/lib/active_record/associations/preloader/association.rb @@ -19,7 +19,7 @@ module ActiveRecord 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 diff --git a/activesupport/lib/active_support/inflector/transliterate.rb b/activesupport/lib/active_support/inflector/transliterate.rb index 6a35f4cc2a..c398b25d0f 100644 --- a/activesupport/lib/active_support/inflector/transliterate.rb +++ b/activesupport/lib/active_support/inflector/transliterate.rb @@ -64,7 +64,7 @@ module ActiveSupport 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 diff --git a/activesupport/test/transliterate_test.rb b/activesupport/test/transliterate_test.rb index 3d1fd6a893..75f37fcf2f 100644 --- a/activesupport/test/transliterate_test.rb +++ b/activesupport/test/transliterate_test.rb @@ -88,7 +88,7 @@ class TransliterateTest < ActiveSupport::TestCase 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