async 1.10.1 → 1.10.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e0b789abc06e34991f2e29573f377f4c5c2fdc6c11d3d22b33d524ec82a73e23
4
- data.tar.gz: eafd1a24553091204bf1bf6f0340b9221ae27b28873acf1e3201db3f6859cf3f
3
+ metadata.gz: c453be8cbd3dc65bb808ad0757c8bfcf713c21419d031dae45ca6f79ab15538c
4
+ data.tar.gz: 0bc5b188d86f1b41a7cf7ee5feb394d93ec29aa1b80d603b962db6c1642bd33a
5
5
  SHA512:
6
- metadata.gz: fcc907cf78c1c61a01acf1ee54473c80c73456796d372e7940104aafaed78c1cb8b7a506185227ebcf74fe1d54116c882f1f4fb5039920f9df4f678ef3c2193f
7
- data.tar.gz: d9c4d25e9b9dc60367954a803a9581ac865550bccf229471a7a9cfc171e8d4b50ee2df5c35ed71116f6947c367f8072a7c9ca506e26322f131ace226e816dd14
6
+ metadata.gz: 6ca7bb807f50d1657d1e1727ca73817567358e2bc15776fe80d9cb9111cf2e2679e70d17bde9b29fe09baa7bfefef3621991282e18118b894e41109b611786c3
7
+ data.tar.gz: 937b4cf7109b3252a65e80f9fe42bdbbb0f5468302ff3b9fef8f67e96dae96f47a0d865a016732bafa445fcaf2799a4e6649ae62e738be852ea881d18eafb197
@@ -19,5 +19,5 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  module Async
22
- VERSION = "1.10.1"
22
+ VERSION = "1.10.2"
23
23
  end
@@ -49,6 +49,10 @@ module Async
49
49
  @any = nil
50
50
  end
51
51
 
52
+ def dup
53
+ self.class.new(@io.dup, @reactor)
54
+ end
55
+
52
56
  def resume(*args)
53
57
  # It's possible that the monitor was closed before calling resume.
54
58
  return unless @monitor
@@ -167,6 +167,18 @@ RSpec.describe Async::Wrapper do
167
167
  end
168
168
  end
169
169
 
170
+ describe '#dup' do
171
+ let(:dup) {input.dup}
172
+
173
+ it 'dups the underlying io' do
174
+ expect(dup.io).to_not eq input.io
175
+
176
+ dup.close
177
+
178
+ expect(input).to_not be_closed
179
+ end
180
+ end
181
+
170
182
  describe '#close' do
171
183
  it "closes monitor when closing wrapper" do
172
184
  input.wait_writable
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.1
4
+ version: 1.10.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-06 00:00:00.000000000 Z
11
+ date: 2018-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nio4r