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 +8 -8
- data/lib/totally_lazy/sequence.rb +4 -0
- data/spec/totally_lazy/sequence_spec.rb +4 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NzhhOTY5ZjhkZmY5MGM3MjE0ZDlkYjU3ZTA3ZTZlNmZkYjYyNzBjMA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MDkzYjVmNDQ3ZDhkNjViM2ZjOTA1ZDYyOTFkOGY4ZDk5MWZmY2M4Nw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OThkYTQ5OGRmNDlkNDFlYTYxOTU4NmE2YWJmYWJiNTVmMmZjMjY2M2UxNzVi
|
10
|
+
NTA5ZWY4ODE2MzI2YWY3MmFkMTFhOGJlOGZiYTc0ZDVmOTAzMThkNWI0Mzll
|
11
|
+
OWI1YWY4MDk3YTFlZjM1ZjhhOTVlYmFjNTFjNGEwY2ViNmM5N2U=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NTljZWYyYzNkYzFhN2RmNWIwOWU0ZDYxYTY5YWJlY2ZkNzE3MmY3MTA0NTUx
|
14
|
+
NjUwN2JkMTg4MmIwMTA4M2Y2YzVjZTViOWU5MDFhNDhmMjkxNTU5Y2Q1YmNh
|
15
|
+
Mjg4NDEzNzJmNDU0ZWQ5MThjODg4OGNjMjIzOTkzZmNhNzdkNTM=
|
@@ -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)
|