riddle 1.0.9 → 1.0.10

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 (2) hide show
  1. data/lib/riddle/client.rb +6 -8
  2. metadata +2 -2
@@ -474,16 +474,14 @@ module Riddle
474
474
  # Connects to the Sphinx daemon, and yields a socket to use. The socket is
475
475
  # closed at the end of the block.
476
476
  def connect(&block)
477
- if @socket && !@socket.closed?
478
- yield @socket
479
- else
477
+ if @socket.nil? || @socket.closed?
480
478
  @socket = nil
481
479
  open_socket
482
- begin
483
- yield @socket
484
- ensure
485
- close_socket
486
- end
480
+ end
481
+ begin
482
+ yield @socket
483
+ ensure
484
+ close_socket
487
485
  end
488
486
  end
489
487
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: riddle
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.9
4
+ version: 1.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pat Allan
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-29 00:00:00 +08:00
12
+ date: 2010-02-16 00:00:00 +11:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency