iprocess 5.1.0 → 5.1.1

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,3 +1,3 @@
1
1
  class IProcess
2
- VERSION = '5.1.0'
2
+ VERSION = '5.1.1'
3
3
  end
data/lib/iprocess.rb CHANGED
@@ -104,6 +104,6 @@ class IProcess
104
104
  #
105
105
  def result
106
106
  Process.wait(@pid)
107
- @channel.recv
107
+ @channel.recv if @channel.readable?
108
108
  end
109
109
  end
@@ -21,4 +21,11 @@ class IProcessTest < Test::Unit::TestCase
21
21
  sleep 0.1
22
22
  assert_equal [{ok: true}, {ok: true}], inbox.messages
23
23
  end
24
+
25
+ def test_async_spawn_with_raise
26
+ inbox = Inbox.new
27
+ IProcess.spawn!(2, inbox) { raise RuntimeError, "", [] }
28
+ sleep 0.1
29
+ assert_equal [nil, nil] inbox.messages
30
+ end
24
31
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iprocess
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.0
4
+ version: 5.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: