From 9b08afd2f4d501fb1710ba0ed4e19313093605c8 Mon Sep 17 00:00:00 2001 From: Milan Dobrota Date: Sun, 4 Sep 2011 10:44:08 -0500 Subject: if ... nil? is more expensive than unless --- actionpack/lib/action_controller/caching/sweeping.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_controller/caching/sweeping.rb') diff --git a/actionpack/lib/action_controller/caching/sweeping.rb b/actionpack/lib/action_controller/caching/sweeping.rb index 938a6ae81c..49cf70ec21 100644 --- a/actionpack/lib/action_controller/caching/sweeping.rb +++ b/actionpack/lib/action_controller/caching/sweeping.rb @@ -88,7 +88,7 @@ module ActionController #:nodoc: end def method_missing(method, *arguments, &block) - return if @controller.nil? + return unless @controller @controller.__send__(method, *arguments, &block) end end -- cgit v1.2.3