futuroscope 0.1.10 → 0.1.11

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
  SHA1:
3
- metadata.gz: 337e18c04c9dafa5a2680bc3f1565fa1f8fd93e2
4
- data.tar.gz: 178323eacd389f23797b512639853a6a00e2a4db
3
+ metadata.gz: 70defe434bca5f53af4dd004596ac2315f45a4ae
4
+ data.tar.gz: 7de8f394106d763a39f14630675775a1e128ba7a
5
5
  SHA512:
6
- metadata.gz: b4c25e2154015c1165048966eac5fd73de8193b944428b95c41e7b21cebb6d2e5f721bef55fcfe7ef2864d4dd8338e41ffe4ac5f043477dd0f98678eda06a8ce
7
- data.tar.gz: 6863eb57bce929a577d196e4ce2a6a477deec66f032292f9efee777d3e21fb2ad7073c7d86735ea16886e6627886380063a0686af3f4ee2b7e1c820b6ec8b82e
6
+ metadata.gz: 4bbcbfc268c2df938baff9c664f6d10aa6036d59f1cd85e90425f3dcb2e0b7c9fa985e4079aa178b2cce991ce824ca6eb275ba4e80a36b4a4954a66c636e1280
7
+ data.tar.gz: fcb921324f145df0c3d2aa8d044cc4ee17839899c11cf652302a52c7f16bfdb5749f181d8a8de808a8d3d90beda9e400ae0f3be2b1e6aa9ebe852f48acc933c0
@@ -70,7 +70,7 @@ module Futuroscope
70
70
  def resolved_future_value_or_raise
71
71
  resolved = resolved_future_value
72
72
 
73
- raise resolved[:exception] if resolved[:exception]
73
+ Kernel.raise resolved[:exception] if resolved[:exception]
74
74
  resolved
75
75
  end
76
76
 
@@ -1,3 +1,3 @@
1
1
  module Futuroscope
2
- VERSION = "0.1.10"
2
+ VERSION = "0.1.11"
3
3
  end
@@ -38,11 +38,9 @@ module Futuroscope
38
38
  end
39
39
 
40
40
  it "captures exceptions and re-raises them when calling the value" do
41
- future = Future.new{ raise "Ed Balls" }
41
+ future = Future.new { raise "Ed Balls" }
42
42
 
43
- expect(lambda{
44
- future.inspect
45
- }).to raise_error(Exception)
43
+ expect { future.inspect }.to raise_error RuntimeError, "Ed Balls"
46
44
  end
47
45
 
48
46
  it "returns the original object when future_value gets called" do
@@ -60,11 +58,9 @@ module Futuroscope
60
58
  end
61
59
 
62
60
  it "re-raises captured exception when trying to marshal" do
63
- future = Future.new{ raise Exception }
61
+ future = Future.new { raise "Ed Balls" }
64
62
 
65
- expect(lambda{
66
- Marshal.dump(future)
67
- }).to raise_error(Exception)
63
+ expect { Marshal.dump(future) }.to raise_error RuntimeError, "Ed Balls"
68
64
  end
69
65
 
70
66
  it "correctly duplicates a future object" do
@@ -98,7 +94,7 @@ module Futuroscope
98
94
  f1.future_value
99
95
  f2.future_value
100
96
  end
101
- sleep 2
97
+ sleep 2.5
102
98
  expect(test_thread).to_not be_alive
103
99
  test_thread.kill
104
100
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: futuroscope
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep Jaume Rey Peroy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-11 00:00:00.000000000 Z
11
+ date: 2014-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler