From 924acc631737478a8bdb634c2118b49cfb6b24b5 Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Wed, 31 Jul 2013 21:28:30 +1000 Subject: [PATCH] remove warning about unused variable and actually set message --- lib/restclient/exceptions.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/restclient/exceptions.rb b/lib/restclient/exceptions.rb index 54e7e8a..8d46f7d 100644 --- a/lib/restclient/exceptions.rb +++ b/lib/restclient/exceptions.rb @@ -155,7 +155,9 @@ module RestClient # A redirect was encountered; caught by execute to retry with the new url. class Redirect < Exception - message = 'Redirect' + def message + 'Redirect' + end attr_accessor :url @@ -165,7 +167,9 @@ module RestClient end class MaxRedirectsReached < Exception - message = 'Maximum number of redirect reached' + def message + 'Maximum number of redirect reached' + end end # The server broke the connection prior to the request completing. Usually