diff --git a/app/controllers/journals_controller.rb b/app/controllers/journals_controller.rb index f7b821312..cbf545187 100644 --- a/app/controllers/journals_controller.rb +++ b/app/controllers/journals_controller.rb @@ -68,11 +68,11 @@ class JournalsController < ApplicationController if @journal user = @journal.user text = @journal.notes - @content = +"#{ll(Setting.default_language, :text_user_wrote_in, {:value => user, :link => "#note-#{params[:journal_indice]}"})}\n> " + @content = "#{ll(Setting.default_language, :text_user_wrote_in, {:value => user, :link => "#note-#{params[:journal_indice]}"})}\n> " else user = @issue.author text = @issue.description - @content = +"#{ll(Setting.default_language, :text_user_wrote, user)}\n> " + @content = "#{ll(Setting.default_language, :text_user_wrote, user)}\n> " end # Replaces pre blocks with [...] text = text.to_s.strip.gsub(%r{
(.*?)}m, '[...]') diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb index 769cdff67..5050d94a7 100644 --- a/app/controllers/messages_controller.rb +++ b/app/controllers/messages_controller.rb @@ -120,9 +120,9 @@ class MessagesController < ApplicationController @subject = "RE: #{@subject}" unless @subject.starts_with?('RE:') if @message.root == @message - @content = +"#{ll(Setting.default_language, :text_user_wrote, @message.author)}\n> " + @content = "#{ll(Setting.default_language, :text_user_wrote, @message.author)}\n> " else - @content = +"#{ll(Setting.default_language, :text_user_wrote_in, {:value => @message.author, :link => "message##{@message.id}"})}\n> " + @content = "#{ll(Setting.default_language, :text_user_wrote_in, {:value => @message.author, :link => "message##{@message.id}"})}\n> " end @content << @message.content.to_s.strip.gsub(%r{
(.*?)}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n" diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 08fa8c2d1..9be7878ce 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -264,7 +264,7 @@ class RepositoriesController < ApplicationController if params[:format] == 'diff' @diff = @repository.diff(@path, @rev, @rev_to) (show_error_not_found; return) unless @diff - filename = +"changeset_r#{@rev}" + filename = "changeset_r#{@rev}" filename << "_r#{@rev_to}" if @rev_to send_data @diff.join, :filename => "#{filename}.diff", :type => 'text/x-patch', diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 5e873fe62..49e8b0a82 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -361,7 +361,7 @@ module ApplicationHelper end def toggle_link(name, id, options={}) - onclick = +"$('##{id}').toggle(); " + onclick = "$('##{id}').toggle(); " onclick << (options[:focus] ? "$('##{options[:focus]}:visible').focus(); " : "this.blur(); ") onclick << "$(window).scrollTop($('##{options[:focus]}').position().top); " if options[:scroll] onclick << "return false;" @@ -1479,7 +1479,7 @@ module ApplicationHelper div_class = +'toc' div_class << ' right' if right_align div_class << ' left' if left_align - out = +"
#{code}#{after}", false)
+ rip_offtags("#{before}#{code}#{after}", false)
end
end
@@ -844,7 +844,7 @@ class RedCloth3 < String
next all unless uri_with_link_safe_scheme?(url)
atts = pba(atts)
- atts = +" href=\"#{url}#{slash}\"#{atts}"
+ atts = " href=\"#{url}#{slash}\"#{atts}"
atts << " title=\"#{htmlesc title}\"" if title
atts = shelve(atts) if atts
external = (url =~ /^https?:\/\//) ? ' class="external"' : ''
@@ -953,7 +953,7 @@ class RedCloth3 < String
stln, algn, atts, url, title, href, href_a1, href_a2 = $~[1..8]
htmlesc title
atts = pba(atts)
- atts = +" src=\"#{htmlesc url.dup}\"#{atts}"
+ atts = " src=\"#{htmlesc url.dup}\"#{atts}"
atts << " title=\"#{title}\"" if title
atts << " alt=\"#{title}\""
# size = @getimagesize($url);
@@ -1099,12 +1099,12 @@ class RedCloth3 < String
### NB: some changes were made not to use $N variables, because we use "match"
### and it breaks following lines
htmlesc(aftertag, :NoQuotes) if aftertag && escape_aftertag && !first.match(//)
- line = +""
+ line = ""
first =~ /<#{OFFTAGS}([^>]*)>/o
tag = $1
$2.to_s =~ /(class\=("[^"]+"|'[^']+'))/i
tag << " #{$1}" if $1 && tag == 'code'
- @pre_list << +"<#{tag}>#{aftertag}"
+ @pre_list << "<#{tag}>#{aftertag}"
end
elsif $1 and codepre > 0
if codepre - used_offtags.length > 0
diff --git a/test/unit/repository_test.rb b/test/unit/repository_test.rb
index 520786f2f..63aa43d35 100644
--- a/test/unit/repository_test.rb
+++ b/test/unit/repository_test.rb
@@ -310,7 +310,7 @@ class RepositoryTest < ActiveSupport::TestCase
)
long_whitespace = " "
expected_comment = "This is a loooooooooooooooooooooooooooong comment"
- comment = +"#{expected_comment}#{long_whitespace}\n"
+ comment = "#{expected_comment}#{long_whitespace}\n"
3.times {comment << "#{long_whitespace}\n"}
changeset = Changeset.new(
:comments => comment, :commit_date => Time.now,