From 6b3ad0cafc4203b0a171ac3c8be24e1c4402e150 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Fri, 24 Sep 2010 12:54:31 +0200 Subject: [PATCH] There is no need to use instance_eval since the proc is created in the same context it is eval'ed. --- actionpack/lib/action_controller/metal/redirecting.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actionpack/lib/action_controller/metal/redirecting.rb b/actionpack/lib/action_controller/metal/redirecting.rb index fb50fcae16..55c650df6c 100644 --- a/actionpack/lib/action_controller/metal/redirecting.rb +++ b/actionpack/lib/action_controller/metal/redirecting.rb @@ -88,7 +88,7 @@ def _compute_redirect_to_location(options) raise RedirectBackError unless refer = request.headers["Referer"] refer when Proc - _compute_redirect_to_location instance_eval(&options) + _compute_redirect_to_location options.call else url_for(options) end.gsub(/[\r\n]/, '') -- GitLab