gene_pool 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/History.md +5 -1
  2. data/lib/gene_pool.rb +6 -1
  3. metadata +2 -2
data/History.md CHANGED
@@ -1,7 +1,11 @@
1
1
  GenePool Changelog
2
2
  =====================
3
3
 
4
- 1.2.0 / 2011-12-07
4
+ 1.2.1 / 2012-02-23
5
+
6
+ - Oops, broke 1.8 compatibility with 1.2.0. Hacking $VERBOSE setting so as to not spam deprecation warnings.
7
+
8
+ 1.2.0 / 2012-02-23
5
9
 
6
10
  - Allow dynamic modification of pool size.
7
11
  - Added close method which will prevent checking out of new connections and wait for and close all current connections.
data/lib/gene_pool.rb CHANGED
@@ -205,8 +205,13 @@ class GenePool
205
205
  close_connection(old_connection)
206
206
  @checked_out[index] = new_connection
207
207
  @connections[@connections.index(old_connection)] = new_connection
208
+
209
+ # Suppress spam of deprecation warnings since 1.8 doesn't support Hash#key
210
+ old_verbose, $VERBOSE = $VERBOSE, nil
208
211
  # If this is part of a with_connection block, then track our new connection
209
- with_key = @with_map.key(old_connection)
212
+ with_key = @with_map.index(old_connection)
213
+ $VERBOSE = old_verbose
214
+
210
215
  @with_map[with_key] = new_connection if with_key
211
216
  end
212
217
  @logger.debug {"#{@name}: Renewed connection old=#{old_connection.object_id} new=#{new_connection}(#{new_connection.object_id})"}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gene_pool
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -39,7 +39,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
39
39
  version: '0'
40
40
  segments:
41
41
  - 0
42
- hash: 4582705740128393740
42
+ hash: -1060493381430936515
43
43
  required_rubygems_version: !ruby/object:Gem::Requirement
44
44
  none: false
45
45
  requirements: