Fix modifying frozen strings errors take 3.

This commit is contained in:
Guo Xiang Tan 2019-05-13 16:45:23 +08:00
parent 74989783da
commit 64c117519e
3 changed files with 4 additions and 4 deletions

View File

@ -28,7 +28,7 @@ class SessionController < ApplicationController
if destination_url && return_path == path('/') if destination_url && return_path == path('/')
uri = URI::parse(destination_url) uri = URI::parse(destination_url)
return_path = "#{uri.path}#{uri.query ? "?" << uri.query : ""}" return_path = "#{uri.path}#{uri.query ? "?#{uri.query}" : ""}"
end end
session.delete(:destination_url) session.delete(:destination_url)
@ -229,7 +229,7 @@ class SessionController < ApplicationController
render_sso_error(text: text || I18n.t("sso.unknown_error"), status: 500) render_sso_error(text: text || I18n.t("sso.unknown_error"), status: 500)
rescue => e rescue => e
message = "Failed to create or lookup user: #{e}." message = +"Failed to create or lookup user: #{e}."
message << " " message << " "
message << " #{sso.diagnostics}" message << " #{sso.diagnostics}"
message << " " message << " "

View File

@ -1001,7 +1001,7 @@ class Topic < ActiveRecord::Base
end end
def self.url(id, slug, post_number = nil) def self.url(id, slug, post_number = nil)
url = "#{Discourse.base_url}/t/#{slug}/#{id}" url = +"#{Discourse.base_url}/t/#{slug}/#{id}/"
url << "/#{post_number}" if post_number.to_i > 1 url << "/#{post_number}" if post_number.to_i > 1
url url
end end

View File

@ -168,7 +168,7 @@ class TopicTrackingState
# #
# This code needs to be VERY efficient as it is triggered via the message bus and may steal # This code needs to be VERY efficient as it is triggered via the message bus and may steal
# cycles from usual requests # cycles from usual requests
sql = report_raw_sql( sql = +report_raw_sql(
topic_id: topic_id, topic_id: topic_id,
skip_unread: true, skip_unread: true,
skip_order: true, skip_order: true,