From 1cc6a70718713df87f9d5532a23d30488921dbf4 Mon Sep 17 00:00:00 2001 From: TJ Singleton Date: Sun, 18 Sep 2011 16:26:26 -0400 Subject: [PATCH 1/3] pass type through to reeds on 1.8.7 --- lib/connection_pool.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/connection_pool.rb b/lib/connection_pool.rb index a48a30f..ee4a21e 100644 --- a/lib/connection_pool.rb +++ b/lib/connection_pool.rb @@ -26,6 +26,8 @@ require 'connection_pool/timed_queue' class ConnectionPool DEFAULTS = { :size => 5, :timeout => 5 } + undef :type + def initialize(options={}) raise ArgumentError, 'Connection pool requires a block' unless block_given? From 84fba27c479ca6b3d3ec5758326455f0f0be2c72 Mon Sep 17 00:00:00 2001 From: TJ Singleton Date: Sun, 18 Sep 2011 16:30:08 -0400 Subject: [PATCH 2/3] should have been class --- lib/connection_pool/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/connection_pool/version.rb b/lib/connection_pool/version.rb index 62858ba..580a48e 100644 --- a/lib/connection_pool/version.rb +++ b/lib/connection_pool/version.rb @@ -1,3 +1,3 @@ -module ConnectionPool +class ConnectionPool VERSION = "0.0.3" end From 6ce5412fb1c4569b126c6812b75758291a8675d0 Mon Sep 17 00:00:00 2001 From: TJ Singleton Date: Sun, 18 Sep 2011 16:37:17 -0400 Subject: [PATCH 3/3] only undef if defined --- lib/connection_pool.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/connection_pool.rb b/lib/connection_pool.rb index ee4a21e..873f7b6 100644 --- a/lib/connection_pool.rb +++ b/lib/connection_pool.rb @@ -26,7 +26,7 @@ require 'connection_pool/timed_queue' class ConnectionPool DEFAULTS = { :size => 5, :timeout => 5 } - undef :type + undef :type if defined?(type) def initialize(options={}) raise ArgumentError, 'Connection pool requires a block' unless block_given?