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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ODUyNTEyOTNlZmZkOTQ5Y2U0ODdlOGU4MTE1ODlmYzk1YWQ1YzE1ZA==
4
+ MDFiMzI4NzkzYTJlYWRjYWZjMmEzNGM1ZGI5ZTRkOTY4YjlkYWEzZg==
5
5
  data.tar.gz: !binary |-
6
- NDM4NDQyY2JkNTBmNzM2NjA0NTdiMjUyZTFkN2M0ODkyZmQ5ZGYxZQ==
6
+ NDQ0MDZjZWIxMTYzY2NjZjk0OTYyN2FkNDkwNDU1MTIyOTlmNzczMg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NzhiMzgzMjdiZjQ3NjA4ZWI2NGE1MTAyNDVlZThhNjc5N2I3NzZhYjZlMDQ1
10
- YjNjZDE1Zjg0Zjc2NGNjYTRiMWViZmIwM2FjNGNiN2Q1NzdiZTAzY2NjNzFl
11
- MmExYzY3YzQ4Njc0ZjMyYTBmN2NkMjExMTJiYmZlYWQ4NDM1MjE=
9
+ NTNiMTEyZDY0ZDdlMDEwMDc2NTIzMTg2ZjkwODc5N2I5MTA4MWQ1MGY2MzA2
10
+ M2FjYmQzYjI3NTBjNjk1OGU4OGZmODM1ZWE2ZDNiNWNmN2VjNDE1YzYxODg1
11
+ NWUzZjMxNWIxYmRiMWI4ZmE3ZTkzYjRkZmJlZjY1ZjI0ZjlkOGM=
12
12
  data.tar.gz: !binary |-
13
- NzgwYjhiZWY1NWIxNDNkYzg3NDEzZTBiYTE5NTI4Yzc2MTAxYjVmZTYxMzM2
14
- MWE4MDAzMjVlOTkxMzNmZTVjN2Y1ZGRhZjVjMGQzMDNmNDBlOWUwNjBlZjFm
15
- MzY5MDZhOWVmMTRmNWU3MWQ3OTBlOTBmMDNjMTI0OWZmYmM1MGQ=
13
+ ZWQwMWIzNzUzZWNkZThjM2QxMWM2MGZiZjRhODhhNWVkODhhZjYwZDg1YzM5
14
+ MDJmYmM2YWIyNmVkYzM1NWU0MDRkNDBlYjBkYzZiMDk4ZTRiNmJhYTBhNzRi
15
+ NWExNTUzMTg5YWRjNTUyYjlmNmVjMDc4MTRiMDQ2MTNmNDA0M2Q=
@@ -313,7 +313,7 @@ class Sequence
313
313
  end
314
314
 
315
315
  def to_s
316
- "[#{self.take(100).reduce(join_with_sep(','))}]"
316
+ "[#{self.is_empty? ? '' : self.take(100).reduce(join_with_sep(','))}]"
317
317
  end
318
318
 
319
319
  private
@@ -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)
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.47
4
+ version: 0.1.48
5
5
  platform: ruby
6
6
  authors:
7
7
  - Raymond Barlow