zipstream 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/zipstream/fiber.rb +5 -5
  3. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
@@ -13,17 +13,17 @@ else
13
13
  @body = lambda &block
14
14
  end
15
15
 
16
- def resume arg
16
+ def resume *args
17
17
  @@fibers.push self
18
18
  # jumping into fiber
19
- jump arg
19
+ jump *args
20
20
  end
21
21
 
22
22
  def self.current
23
23
  @@fibers.last
24
24
  end
25
25
 
26
- def self.yield arg
26
+ def self.yield arg=nil
27
27
  if fiber = @@fibers.pop
28
28
  # jumping out of fiber
29
29
  fiber.send :jump, arg
@@ -32,10 +32,10 @@ else
32
32
 
33
33
  private
34
34
 
35
- def jump arg
35
+ def jump *args
36
36
  callcc do |continuation|
37
37
  destination, @body = @body, continuation
38
- destination.call arg
38
+ destination.call *args
39
39
  @@fibers.pop
40
40
  # return from the last 'resume'
41
41
  @body.call
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zipstream
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-12-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &70130652353800 !ruby/object:Gem::Requirement
16
+ requirement: &70305888673700 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: 2.7.0
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70130652353800
24
+ version_requirements: *70305888673700
25
25
  description:
26
26
  email: sj26@sj26.com
27
27
  executables: []