coroutines 0.2.1 → 0.2.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a2fa7ac85ca8235cd32795dc01769e4203155e3b
4
- data.tar.gz: a3e56d66919ec36730231a369c0ec776732f760c
3
+ metadata.gz: 1a13c2fd15318469d3a2c25969de20c18cb808b5
4
+ data.tar.gz: 3a2f191b2edf8fae89f18f8695c7acb9cfb0bcc5
5
5
  SHA512:
6
- metadata.gz: 4e26d6f223b0e3f0f6e7336ddedaafcaf38e973c36e805de019ce6c0ad3b22577ab5e5df82bad0f45914a9212ff1749f33e17817d627fd6e13c204e9901761ae
7
- data.tar.gz: 155ccb30cdd1c8c96b0a132994c5a2dd1e660ba030c0a1cd8850ec77778923461a6b54d60026eb5e08b61106246edede58ab6988a00902a3b7fa46b2a73a0247
6
+ metadata.gz: 1ad9c8c3d83a46dedab17f38e35b0b128b8240c81042fa44299683bdd367d4b6b0debac42f401d63e99441101a18dc177b3a29e6324b3ff42550633e5ed2d048
7
+ data.tar.gz: b2289440dd90267af26021317c0046e37ef321dcf80e50ed7dae1753cd204eba88a73d13c8ac790ccf5a10f90cf041399975e45b57b0ff6be610d7400d34a206
@@ -49,10 +49,12 @@ class Enumerator::Lazy
49
49
  #--
50
50
  # taken from the API doc of Enumerator::Lazy.new
51
51
  def filter_map
52
- Lazy.new(self) do |yielder, *values|
53
- result = yield *values
54
- yielder << result if result
55
- end
52
+ Enumerator.new do |yielder|
53
+ each do |*values|
54
+ result = yield *values
55
+ yielder << result if result
56
+ end
57
+ end.lazy
56
58
  end
57
59
  end
58
60
 
@@ -46,7 +46,7 @@ module Sink
46
46
  #
47
47
  # Returns a new sink which feeds those inputs for which +block+ returns a
48
48
  # true value to +sink+ and discards all others.
49
- def input_select
49
+ def input_select(&block)
50
50
  InputSelectWrapper.new(self, &block)
51
51
  end
52
52
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coroutines
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Knut Franke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-14 00:00:00.000000000 Z
11
+ date: 2014-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lazy_enumerator