From e6679313338c4f14fb2475f92976005d9ccd6560 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Wed, 12 May 2010 14:02:22 -0400 Subject: [PATCH] message for regular redirect --- lib/apache/rewrites.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/apache/rewrites.rb b/lib/apache/rewrites.rb index 3298d08..b7649c9 100644 --- a/lib/apache/rewrites.rb +++ b/lib/apache/rewrites.rb @@ -34,6 +34,9 @@ module Apache # # r301 '/here', '/there' #=> Redirect permanent "/here" "/there" def r301(*opt) + if opt.first && !opt.first.kind_of?(::String) + raise "First parameter should be a String. Did you mean to wrap this in a rewrites block? #{opt.first}" + end self << "Redirect permanent #{quoteize(*opt) * " "}" end end