totally_lazy 0.1.51 → 0.1.52

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MTA2MGMwNjNjMzQyNmIyZjAzZmYxY2NhZTBjNzMyMWZlOTdjOTVjYQ==
4
+ Y2NkOTk0YzkwOGE5NTgwMjI3MzA4NTdlNGEwZDgyZmYxODQ2ZjE4MA==
5
5
  data.tar.gz: !binary |-
6
- NGM4MDZkNDVhNDU5OGRlYzI5NDFlMWIyYWY4NjkxMmFlZTEzMzdiZQ==
6
+ NTgzYWNiNmEyM2I4M2IzOWM3YWE4NGZhMjY3ZDI3MDE2OWRkMjM4Zg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZmRhNjQyZGVhMjU1OGE4OGQ5MzNlMzQyYmY0NjM2MWI3YTI0YTI5YWIwYmY4
10
- ZDUyMGU2MmI5OWYwYjkyNzczNTczYTA3MTI3ODg2YmYwMzE1MzEzNDZjZjc0
11
- NmQ1YWJkNzYxYjAyOWE3MjE4ZjlhMTY3OTJjNjU0ZWJmYmZlYzU=
9
+ Y2YwMmU2Mzg0YWEzZWJjYWI5NzAyYzhkYzdiYzQ5YzYzOTFlYmU4OTRhMTQz
10
+ MjQzMzExYTQ0OWFkNWNiZjk4YWQ5OGE2MzRmZTU1ZDZjMjcwODNhNzNiMDU1
11
+ Y2EyNmQ1ZDhmODI4NGY2ZDcxYjIzZDc2M2EyYWQ0MDBkOGFiMzE=
12
12
  data.tar.gz: !binary |-
13
- OGM3MzBlYjZiZTY0ZTA2YTY1NTEyYjE2OTU2M2JmMjlmMmYwNWU2Mjk0YjI2
14
- ZGU0MzhmY2FjMTE4NGM2MWNjMWYxNTFjYjMzZGI2NTM1ZDllOTEzZTg3OTVk
15
- ODVmZmYzYzAyN2I2Mjk5NzM3NzlkOTFkMTk3NDU3MzVkMDlmN2I=
13
+ NGYyMGVkMmVmZjMwMGZmM2JmOGUxNGMyNmFmYzgyODk4ZTIwNWIwZjExMjIy
14
+ NDBkMjBkZWYxOTRmNzU1YzEwMzI2MzBlNGJlZDY0ZTE5ODA2YzZiMmI3MGU3
15
+ NTM0YjFiYmQ0YTQ5NzZkYzAyOGRhODljMmJjNDNhZGU0ZjhmYjE=
@@ -304,6 +304,13 @@ class Sequence
304
304
  Sequence.new(@enumerator.to_a.lazy)
305
305
  end
306
306
 
307
+ def join(other)
308
+ Sequence.new(Enumerator.new do |y|
309
+ @enumerator.each { |value| y << value }
310
+ other.enumerator.each { |value| y << value }
311
+ end.lazy)
312
+ end
313
+
307
314
  def to_a
308
315
  @enumerator.to_a
309
316
  end
@@ -301,6 +301,10 @@ describe 'Sequence' do
301
301
  expect(sequence(sequence(1)).flatten.to_s).to eq('[1]')
302
302
  end
303
303
 
304
+ it 'should support join' do
305
+ expect(sequence(1,2,3).join(sequence(4,5,6))).to eq(sequence(1,2,3,4,5,6))
306
+ end
307
+
304
308
  it 'should raise exception if you try to use both lambda and block' do
305
309
  expect { empty.map(->(a) { a+1 }) { |b| b+2 } }.to raise_error(RuntimeError)
306
310
  expect { empty.map_concurrently(->(a) { a+1 }) { |b| b+2 } }.to raise_error(RuntimeError)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: totally_lazy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.51
4
+ version: 0.1.52
5
5
  platform: ruby
6
6
  authors:
7
7
  - Raymond Barlow