<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -29,10 +29,8 @@ module Bunny
 	def self.new(opts = {})
 		# Set up Bunny according to AMQP spec version required
 		spec_version = opts[:spec] || '08'
-		setup(spec_version, opts)
-		
 		# Return client
-		@client
+		return setup(spec_version, opts)
 	end
 	
 	# Runs a code block using a short-lived connection
@@ -42,13 +40,13 @@ module Bunny
 
 		# Set up Bunny according to AMQP spec version required
 		spec_version = opts[:spec] || '08'
-		setup(spec_version, opts)
+		client = setup(spec_version, opts)
 		
     begin
-      @client.start
-      block.call(@client)
+      client.start
+      block.call(client)
     ensure
-      @client.stop
+      client.stop
     end
 
 		# Return success
@@ -67,7 +65,7 @@ module Bunny
 			require 'bunny/channel08'
 			require 'bunny/subscription08'
 			
-			@client = Bunny::Client.new(opts)
+			client = Bunny::Client.new(opts)
 		else
 			# AMQP 0-9-1 specification
 			require 'qrack/qrack09'
@@ -77,10 +75,11 @@ module Bunny
 			require 'bunny/channel09'
 			require 'bunny/subscription09'
 			
-			@client = Bunny::Client09.new(opts)
+			client = Bunny::Client09.new(opts)
 		end			
 		
 		include Qrack
+    return client
 	end
 
 end</diff>
      <filename>lib/bunny.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>2869bb017fa55c763c48bd5ce175c3973135a201</id>
    </parent>
  </parents>
  <author>
    <name>Jared Kuolt</name>
    <email>me@superjared.com</email>
  </author>
  <url>http://github.com/JaredKuolt/bunny/commit/028126e3b860e549038db5d21bd1cf45245b268d</url>
  <id>028126e3b860e549038db5d21bd1cf45245b268d</id>
  <committed-date>2009-09-29T15:39:28-07:00</committed-date>
  <authored-date>2009-09-29T15:39:28-07:00</authored-date>
  <message>Remove unnecessary (and confusing) instance variable</message>
  <tree>eaf62aa65388b4044a17e1f63eff39081c8f4b0b</tree>
  <committer>
    <name>Jared Kuolt</name>
    <email>me@superjared.com</email>
  </committer>
</commit>
