gene_pool 1.2.1 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/History.md +4 -0
  2. data/lib/gene_pool.rb +6 -4
  3. metadata +2 -2
data/History.md CHANGED
@@ -1,6 +1,10 @@
1
1
  GenePool Changelog
2
2
  =====================
3
3
 
4
+ 1.2.2 / 2012-02-23
5
+
6
+ - Do a respond_to? to check compatibility instead of hacking around with $VERBOSE
7
+
4
8
  1.2.1 / 2012-02-23
5
9
 
6
10
  - Oops, broke 1.8 compatibility with 1.2.0. Hacking $VERBOSE setting so as to not spam deprecation warnings.
@@ -206,11 +206,13 @@ class GenePool
206
206
  @checked_out[index] = new_connection
207
207
  @connections[@connections.index(old_connection)] = new_connection
208
208
 
209
- # Suppress spam of deprecation warnings since 1.8 doesn't support Hash#key
210
- old_verbose, $VERBOSE = $VERBOSE, nil
211
209
  # If this is part of a with_connection block, then track our new connection
212
- with_key = @with_map.index(old_connection)
213
- $VERBOSE = old_verbose
210
+ if @with_map.respond_to?(:key)
211
+ with_key = @with_map.key(old_connection)
212
+ else
213
+ # 1.8 compatibility
214
+ with_key = @with_map.index(old_connection)
215
+ end
214
216
 
215
217
  @with_map[with_key] = new_connection if with_key
216
218
  end
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.1
4
+ version: 1.2.2
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: -1060493381430936515
42
+ hash: -1353625208062098188
43
43
  required_rubygems_version: !ruby/object:Gem::Requirement
44
44
  none: false
45
45
  requirements: