totally_lazy 0.1.37 → 0.1.38

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
- NzgwYzZmMGQ0YzA0OGNkZTdmN2JkYzFkNTgxODIzYTVjODUxNjhiYw==
4
+ NzhhOTY5ZjhkZmY5MGM3MjE0ZDlkYjU3ZTA3ZTZlNmZkYjYyNzBjMA==
5
5
  data.tar.gz: !binary |-
6
- ODdlYWJlMmFjYjc2MDY2NGU3OWIzMTdiYjNmMWM5ZTJjNWMyYzUwZA==
6
+ MDkzYjVmNDQ3ZDhkNjViM2ZjOTA1ZDYyOTFkOGY4ZDk5MWZmY2M4Nw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YTBhODEzNmM0OTFiMGNiZDIyMjg2OGFjNzBmMTUwOThlMjYxNWYxZDFjYWMx
10
- YjE3ZWMyNjA0NDE5OTQwMTg4Y2RhOWEwZTVkMjM2ODY4YjM0MGIzMmU2NmEw
11
- MjI0YmNjYWQzOTU0ZjY0OTZhYWNiNDliNTYyMWYwZTIxMjEzYzE=
9
+ OThkYTQ5OGRmNDlkNDFlYTYxOTU4NmE2YWJmYWJiNTVmMmZjMjY2M2UxNzVi
10
+ NTA5ZWY4ODE2MzI2YWY3MmFkMTFhOGJlOGZiYTc0ZDVmOTAzMThkNWI0Mzll
11
+ OWI1YWY4MDk3YTFlZjM1ZjhhOTVlYmFjNTFjNGEwY2ViNmM5N2U=
12
12
  data.tar.gz: !binary |-
13
- MTAwYjk2YjAzMmU0ZWE4NmRjN2Y0OTdkYTMwOTgyY2IxM2I5NTBhNjM2ODY5
14
- NjU0Zjc4NDNmY2Q0YWUxZjgzMmQ5MDg3YmUyYzVkYTZjY2I0OTU2MjMzODg0
15
- OWJkNDZlZmJjNmVjMWNlZWY4ZTM1MzM4YzAwMDM3ZWNjOTM5OGM=
13
+ NTljZWYyYzNkYzFhN2RmNWIwOWU0ZDYxYTY5YWJlY2ZkNzE3MmY3MTA0NTUx
14
+ NjUwN2JkMTg4MmIwMTA4M2Y2YzVjZTViOWU5MDFhNDhmMjkxNTU5Y2Q1YmNh
15
+ Mjg4NDEzNzJmNDU0ZWQ5MThjODg4OGNjMjIzOTkzZmNhNzdkNTM=
@@ -304,6 +304,10 @@ class Sequence
304
304
  Sequence.new(@enumerator.to_a.lazy)
305
305
  end
306
306
 
307
+ def to_a
308
+ @enumerator.to_a
309
+ end
310
+
307
311
  def <=>(other)
308
312
  @enumerator.entries <=> other.enumerator.entries
309
313
  end
@@ -284,6 +284,10 @@ describe 'Sequence' do
284
284
  expect([1,2,3,4,5].to_seq).to eq(sequence(1,2,3,4,5))
285
285
  end
286
286
 
287
+ it 'should allow sequences to be converted to arrays' do
288
+ expect(sequence(1,2,3,4,5).to_a).to eq([1,2,3,4,5])
289
+ end
290
+
287
291
  it 'should raise exception if you try to use both lambda and block' do
288
292
  expect { empty.map(->(a) { a+1 }) { |b| b+2 } }.to raise_error(RuntimeError)
289
293
  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.37
4
+ version: 0.1.38
5
5
  platform: ruby
6
6
  authors:
7
7
  - Raymond Barlow