net-ssh 2.0.14 → 2.0.15

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.
@@ -1,5 +1,10 @@
1
1
 
2
2
 
3
+ === 2.0.15 / 03 Sep 2009
4
+
5
+ * Scale back IO#select patch so it mutexes only zero-timeout calls [Daniel Azuma, Will Bryant]
6
+
7
+
3
8
  === 2.0.14 / 28 Aug 2009
4
9
 
5
10
  * Fix for IO#select threading bug in Ruby 1.8 (LH-1) [Daniel Azuma]
@@ -14,9 +14,9 @@ module Net; module SSH
14
14
  # for different ruby implementations.
15
15
  class Compat
16
16
 
17
- # A workaround for an IO#select threading bug in MRI 1.8.
17
+ # A workaround for an IO#select threading bug in certain versions of MRI 1.8.
18
18
  # See: http://net-ssh.lighthouseapp.com/projects/36253/tickets/1-ioselect-threading-bug-in-ruby-18
19
- # Also: http://redmine.ruby-lang.org/issues/show/1993
19
+ # The root issue is documented here: http://redmine.ruby-lang.org/issues/show/1993
20
20
  if RUBY_VERSION >= '1.9' || RUBY_PLATFORM == 'java'
21
21
  def self.io_select(*params)
22
22
  IO.select(*params)
@@ -24,7 +24,15 @@ module Net; module SSH
24
24
  else
25
25
  SELECT_MUTEX = Mutex.new
26
26
  def self.io_select(*params)
27
- SELECT_MUTEX.synchronize do
27
+ # It should be safe to wrap calls in a mutex when the timeout is 0
28
+ # (that is, the call is not supposed to block).
29
+ # We leave blocking calls unprotected to avoid causing deadlocks.
30
+ # This should still catch the main case for Capistrano users.
31
+ if params[3] == 0
32
+ SELECT_MUTEX.synchronize do
33
+ IO.select(*params)
34
+ end
35
+ else
28
36
  IO.select(*params)
29
37
  end
30
38
  end
@@ -51,7 +51,7 @@ module Net; module SSH
51
51
  MINOR = 0
52
52
 
53
53
  # The tiny component of this version of the Net::SSH library
54
- TINY = 14
54
+ TINY = 15
55
55
 
56
56
  # The current version of the Net::SSH library as a Version instance
57
57
  CURRENT = new(MAJOR, MINOR, TINY)
@@ -1,7 +1,7 @@
1
1
  @spec = Gem::Specification.new do |s|
2
2
  s.name = "net-ssh"
3
3
  s.rubyforge_project = 'net-ssh'
4
- s.version = "2.0.14"
4
+ s.version = "2.0.15"
5
5
  s.summary = "Net::SSH: a pure-Ruby implementation of the SSH2 client protocol."
6
6
  s.description = s.summary
7
7
  s.authors = ["Jamis Buck", "Delano Mandelbaum"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: net-ssh
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.14
4
+ version: 2.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamis Buck
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2009-08-28 00:00:00 -04:00
13
+ date: 2009-09-03 00:00:00 -04:00
14
14
  default_executable:
15
15
  dependencies: []
16
16