From 2a967aebb024066d77f5095e1aa0b627acfd114d Mon Sep 17 00:00:00 2001 From: Jacques Distler Date: Mon, 27 Oct 2008 13:40:50 +0000 Subject: [PATCH] Fix "can't modify frozen string" bug with some versions of Rails. --- app/controllers/wiki_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/wiki_controller.rb b/app/controllers/wiki_controller.rb index 172ba264..1d881da4 100644 --- a/app/controllers/wiki_controller.rb +++ b/app/controllers/wiki_controller.rb @@ -382,7 +382,7 @@ class WikiController < ApplicationController def remote_ip ip = request.remote_ip logger.info(ip) - ip.gsub!(Regexp.union(Resolv::IPv4::Regex, Resolv::IPv6::Regex), '\0') || 'bogus address' + ip.dup.gsub!(Regexp.union(Resolv::IPv4::Regex, Resolv::IPv6::Regex), '\0') || 'bogus address' end def render_rss(hide_description = false, limit = 15, start_date = nil, end_date = nil)