totally_lazy 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0f349b796deda1ef4fcc94670c205949b50ef43e
4
- data.tar.gz: 4dc70d58fdb8a03b646a2b719b3a0576abd55107
3
+ metadata.gz: cfb52906262bbc2dd2e99910b5ede6e740124b89
4
+ data.tar.gz: 61d1e2a40cc9a312d06a972613a4f94222bb6534
5
5
  SHA512:
6
- metadata.gz: 9083cc7feaa8e94ac3a9bef436654d7a32e8881e201b6bfa22f6f9b8879dfdd111dc88a3643669812ed5ce8ba08d4a11a0f4a6dae576357042465bbc73b8dd89
7
- data.tar.gz: dbb5b555a96b0f61f66a91e77c3f90b9d209a223ebf9904bad36f0e702b146e265f226a238cdf27b2abd169601203ba2faffe8742ab3090835522e4eeae20b0e
6
+ metadata.gz: f5a0e8811a004d0058a414a7ef09957ba03365db0b97c6d1e5e44c0c088ea2dd2d87159f743b7aafab230a58549b043e519f77894dab16f75c617d32d1f18140
7
+ data.tar.gz: 9f4708dda0571887af33eec7a74c042dcb412a6d898fb399f35ac2acb09f58b45a485fee53dab521d1758d5a5bed2f25cae3c03d1b2503c0783c5583807ead91
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.12
1
+ 0.0.13
data/lib/sequence.rb CHANGED
@@ -118,10 +118,9 @@ module Sequences
118
118
  }
119
119
  else
120
120
  Sequence.new(self) { |yielder, val|
121
- ary = block.call(val)
122
- ary.each { |x|
123
- yielder << x
124
- }
121
+ val.each {|e|
122
+ yielder << block.call(e)
123
+ }
125
124
  }
126
125
  end
127
126
  end
@@ -91,6 +91,7 @@ describe 'Sequence' do
91
91
  end
92
92
 
93
93
  it 'should support flat_map' do
94
+ expect(sequence(sequence(1, 2), sequence(3, 4)).flat_map { |s| s+1 }).to eq(sequence(2, 3, 4, 5))
94
95
  expect(sequence(sequence(1, 2), sequence(3, 4)).flat_map { |s| s }).to eq(sequence(1, 2, 3, 4))
95
96
  expect(sequence(pair(1, 2), pair(3, 4)).flat_map { |s| s }).to eq(sequence(1, 2, 3, 4))
96
97
  end
data/totally_lazy.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: totally_lazy 0.0.12 ruby lib
5
+ # stub: totally_lazy 0.0.13 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "totally_lazy"
9
- s.version = "0.0.12"
9
+ s.version = "0.0.13"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
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.0.12
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kingsley Hendrickse