diff --git a/activesupport/lib/active_support/core_ext/string/output_safety.rb b/activesupport/lib/active_support/core_ext/string/output_safety.rb
index <HASH>..<HASH> 100644
--- a/activesupport/lib/active_support/core_ext/string/output_safety.rb
+++ b/activesupport/lib/active_support/core_ext/string/output_safety.rb
@@ -170,13 +170,15 @@ module ActiveSupport #:nodoc:
       self[0, 0]
     end
 
-    %w[concat prepend].each do |method_name|
-      define_method method_name do |value|
-        super(html_escape_interpolated_argument(value))
-      end
+    def concat(value)
+      super(html_escape_interpolated_argument(value))
     end
     alias << concat
 
+    def prepend(value)
+      super(html_escape_interpolated_argument(value))
+    end
+
     def prepend!(value)
       ActiveSupport::Deprecation.deprecation_warning "ActiveSupport::SafeBuffer#prepend!", :prepend
       prepend value
concat is a hotspot (via AV#append=), so just directly define the methods