]> git.openstreetmap.org Git - rails.git/blobdiff - lib/rich_text.rb
Fix rubocop warnings
[rails.git] / lib / rich_text.rb
index f38de7621c84d111ab5b6a952883d764dd965998..84e695c6e75a3be7639bc97dd68e898ffd6dc7b7 100644 (file)
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 module RichText
   SPAMMY_PHRASES = [
     "Business Description:", "Additional Keywords:"
@@ -144,7 +146,7 @@ module RichText
     end
 
     def truncated_text_content(element)
-      text = String.new
+      text = +""
 
       append_text = lambda do |child|
         if child.type == :text