totally_lazy 0.1.47 → 0.1.48
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 +1 -1
- data/spec/totally_lazy/sequence_spec.rb +5 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MDFiMzI4NzkzYTJlYWRjYWZjMmEzNGM1ZGI5ZTRkOTY4YjlkYWEzZg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NDQ0MDZjZWIxMTYzY2NjZjk0OTYyN2FkNDkwNDU1MTIyOTlmNzczMg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NTNiMTEyZDY0ZDdlMDEwMDc2NTIzMTg2ZjkwODc5N2I5MTA4MWQ1MGY2MzA2
|
10
|
+
M2FjYmQzYjI3NTBjNjk1OGU4OGZmODM1ZWE2ZDNiNWNmN2VjNDE1YzYxODg1
|
11
|
+
NWUzZjMxNWIxYmRiMWI4ZmE3ZTkzYjRkZmJlZjY1ZjI0ZjlkOGM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZWQwMWIzNzUzZWNkZThjM2QxMWM2MGZiZjRhODhhNWVkODhhZjYwZDg1YzM5
|
14
|
+
MDJmYmM2YWIyNmVkYzM1NWU0MDRkNDBlYjBkYzZiMDk4ZTRiNmJhYTBhNzRi
|
15
|
+
NWExNTUzMTg5YWRjNTUyYjlmNmVjMDc4MTRiMDQ2MTNmNDA0M2Q=
|
@@ -288,6 +288,11 @@ describe 'Sequence' do
|
|
288
288
|
expect(sequence(1,2,3,4,5).to_a).to eq([1,2,3,4,5])
|
289
289
|
end
|
290
290
|
|
291
|
+
it 'should be able to display sequence as a string' do
|
292
|
+
expect(sequence(1,2,3,4,5).to_s).to eq('[1,2,3,4,5]')
|
293
|
+
expect(empty.to_s).to eq('[]')
|
294
|
+
end
|
295
|
+
|
291
296
|
it 'should raise exception if you try to use both lambda and block' do
|
292
297
|
expect { empty.map(->(a) { a+1 }) { |b| b+2 } }.to raise_error(RuntimeError)
|
293
298
|
expect { empty.map_concurrently(->(a) { a+1 }) { |b| b+2 } }.to raise_error(RuntimeError)
|