Should use << for string concatenation in Ruby
authorNathan Broadbent <nathan.f77@gmail.com>
Sat, 27 Dec 2014 15:11:18 +0000 (21:11 +0600)
committerNathan Broadbent <nathan.f77@gmail.com>
Sat, 27 Dec 2014 15:11:18 +0000 (21:11 +0600)
plugins/category_generator.rb

index 9beef9b..769a55b 100644 (file)
@@ -174,8 +174,8 @@ ERR
     # Returns string
     def date_to_html_string(date)
       result = '<span class="month">' + date.strftime('%b').upcase + '</span> '
-      result += date.strftime('<span class="day">%d</span> ')
-      result += date.strftime('<span class="year">%Y</span> ')
+      result << date.strftime('<span class="day">%d</span> ')
+      result << date.strftime('<span class="year">%Y</span> ')
       result
     end