From e2c0dcc0da6582d63c335c4d77a983e83fbb8c10 Mon Sep 17 00:00:00 2001 From: Dustin DeYoung Date: Sun, 26 May 2013 16:14:56 -0400 Subject: [PATCH] Ruby 1.8.7 compatible double slash gsub --- lib/gollum/helpers.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/gollum/helpers.rb b/lib/gollum/helpers.rb index 69d60f6a..1354f862 100644 --- a/lib/gollum/helpers.rb +++ b/lib/gollum/helpers.rb @@ -28,7 +28,7 @@ module Precious # Ensure path begins with a single leading slash def clean_path(path) if path - (path[0] != '/' ? path.insert(0, '/') : path).gsub('//','/') + (path[0] != '/' ? path.insert(0, '/') : path).gsub(/\/{2,}/,'/') end end