diff --git a/lib/sunspot/queue/helpers.rb b/lib/sunspot/queue/helpers.rb
index <HASH>..<HASH> 100644
--- a/lib/sunspot/queue/helpers.rb
+++ b/lib/sunspot/queue/helpers.rb
@@ -7,7 +7,7 @@ module Sunspot::Queue
 
       # Pop off the queueing proxy for the block if it's in place so we don't
       # requeue the same job multiple times.
-      if Sunspot.session.instance_of?(SessionProxy)
+      if Sunspot.session.is_a?(SessionProxy)
         proxy = Sunspot.session
         Sunspot.session = proxy.session
       end
Allow subclasses of Sunspot::Queue::SessionProxy in without_proxy helper

To be able to customize the behaviour of the SessionProxy in your own
application, you should be able to subclass it. This changes the
without_proxy helper method to allow subclasses as well.