diff --git a/app/controllers/projects/wiki_controller.rb b/app/controllers/projects/wiki_controller.rb
index 30a78d38c..fd4fc110e 100644
--- a/app/controllers/projects/wiki_controller.rb
+++ b/app/controllers/projects/wiki_controller.rb
@@ -245,7 +245,7 @@ class Projects::WikiController < Projects::BaseController
when 'revert' then "Reverted page #{@name.to_s}"
when 'revert_wiki' then "Reverted wiki"
end
- msg += " (#{params['format']})" if params['format']
+ msg << " (#{params['format']})" if params['format']
end
msg = 'Unhandled action' if !msg || msg.empty?
{ :message => msg }
diff --git a/app/helpers/diff_helper.rb b/app/helpers/diff_helper.rb
index 6974ca1ad..cfa2a0459 100644
--- a/app/helpers/diff_helper.rb
+++ b/app/helpers/diff_helper.rb
@@ -37,12 +37,12 @@ module DiffHelper
end
prepare(args.merge({:filepath => filepath, :comments => comments, :in_discussion => in_discussion}))
- res = "
"
- res += ""
- res += renderer diff_display.data #diff_display.render(Git::Diff::InlineCallback.new comments, path)
- res += tr_line_comments(comments) if in_discussion
- res += ""
- res += "
"
+ res = ''
+ res << ''
+ res << renderer(diff_display.data) #diff_display.render(Git::Diff::InlineCallback.new comments, path)
+ res << tr_line_comments(comments) if in_discussion
+ res << ''
+ res << '
'
res.html_safe
end
@@ -214,11 +214,11 @@ module DiffHelper
res = ''
if line.inline_changes?
prefix, changed, postfix = line.segments.map{|segment| escape(segment) }
- res += "#{prefix}#{changed}#{postfix}"
+ res << "#{prefix}#{changed}#{postfix}"
else
- res += escape(line)
+ res << escape(line)
end
- res += ''
+ res << ''
res
end
diff --git a/app/helpers/git_helper.rb b/app/helpers/git_helper.rb
index 559deeeb3..c1f71742d 100644
--- a/app/helpers/git_helper.rb
+++ b/app/helpers/git_helper.rb
@@ -33,15 +33,15 @@ module GitHelper
parts = @path.split("/")
current_path = parts.first
- res += parts.length == 1 ? parts.first : link_to(parts.first, tree_path(@project, @treeish, current_path)) + " / "
+ res << (parts.length == 1 ? parts.first : link_to(parts.first, tree_path(@project, @treeish, current_path)) + " / ")
parts[1..-2].each do |part|
current_path = File.join([current_path, part].compact)
- res += link_to(part, tree_path(@project, @treeish, current_path))
- res += " / "
+ res << link_to(part, tree_path(@project, @treeish, current_path))
+ res << " / "
end
- res += parts.last if parts.length > 1
+ res << parts.last if parts.length > 1
else
res = "#{link_to @project.name, tree_path(@project)} /"
end
@@ -51,7 +51,7 @@ module GitHelper
def render_line_numbers(n)
res = ""
- 1.upto(n) {|i| res += "#{i}
" }
+ 1.upto(n){ |i| res << "#{i}
" }
res.html_safe
end