fibre 0.9.9 → 0.9.10

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: 076cc4e6dae00554040ca8e3063d3469a63e1324
4
- data.tar.gz: f741ab822b35765328caf475e4b86e65e1e21c2b
3
+ metadata.gz: 633dd9a0b26627425b640e012e692379c06f561b
4
+ data.tar.gz: 5ab441c8bf6430561201b853188922658fd15cb1
5
5
  SHA512:
6
- metadata.gz: bf5708e702e36d8e118ed143f719bd20da66a37298055546f970aa3f124a4e7b957cf03bc81725c837fcbf22baaca982064668b589a817bca497a0c461d95eba
7
- data.tar.gz: c88451330fecee054e8c7bcb4f1ba803d3fbab4ff43062ec6f5ea0b045b02d34be5e0a076f6eff3dfaedbd49cc231b38087519142156b196f12edf069569a3a0
6
+ metadata.gz: eabdca5d1648fb3d31c20497b02616cf63fefdf5c6dcb834935d1579355d01808550f6bbbd80d132f05b9dbef6da72d07559d29e8b839c4e549c5a39498e07cb
7
+ data.tar.gz: d3ede9823aa33c585841021b2e85c517bd5f7b9c24aa2ba10c8dba72097b4986a3e0d2bbbbf3eef9120e8a9049fd0b913d5830c7907587f910d01ef005752262
@@ -36,7 +36,7 @@ class Fiber
36
36
  # raise exception if we catch exception
37
37
  def yield!
38
38
  Fiber.yield.tap do |y|
39
- raise FiberError.new(y) if y.is_a?(Exception)
39
+ raise Fibre::FiberError.new(y) if y.is_a?(Exception)
40
40
  end
41
41
  end
42
42
 
@@ -1,18 +1,20 @@
1
- class FiberError < StandardError
2
- attr_accessor :parent
1
+ module Fibre
2
+ class FiberError < StandardError
3
+ attr_accessor :parent
3
4
 
4
- def initialize parent = $!
5
- @parent = parent
6
- super(parent && parent.to_s)
7
- end
5
+ def initialize parent = $!
6
+ @parent = parent
7
+ super(parent && parent.to_s)
8
+ end
8
9
 
9
- def set_backtrace backtrace
10
- bt = backtrace
11
- if parent
12
- bt = parent.backtrace
13
- bt << "<<< parent fiber: #{parent.class.name}: #{parent}"
14
- bt.concat backtrace
10
+ def set_backtrace backtrace
11
+ bt = backtrace
12
+ if parent
13
+ bt = parent.backtrace
14
+ bt << "<<< parent fiber: #{parent.class.name}: #{parent}"
15
+ bt.concat backtrace
16
+ end
17
+ super bt
15
18
  end
16
- super bt
17
19
  end
18
20
  end
@@ -34,7 +34,7 @@ module Fibre
34
34
  @pool.shift.tap do |fiber|
35
35
  @reserved[fiber.object_id] = spec
36
36
  err = fiber.resume(spec)
37
- raise FiberError.new(err) if err.is_a?(Exception)
37
+ raise Fibre::FiberError.new(err) if err.is_a?(Exception)
38
38
  end
39
39
 
40
40
  self
@@ -1,3 +1,3 @@
1
1
  module Fibre
2
- VERSION = "0.9.9"
2
+ VERSION = "0.9.10"
3
3
  end
@@ -117,14 +117,14 @@ describe Fibre do
117
117
  Fibre.pool.checkout do
118
118
  raise "test"
119
119
  end
120
- }.to raise_error FiberError
120
+ }.to raise_error Fibre::FiberError
121
121
  end
122
122
 
123
123
  it "should sync with exception" do
124
124
  expect {
125
125
  op = FibreTestOperationWithException.new(4)
126
126
  op.sync
127
- }.to raise_error FiberError
127
+ }.to raise_error Fibre::FiberError
128
128
  end
129
129
 
130
130
  it "should sync array (scoping test)" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fibre
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.9
4
+ version: 0.9.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - inre