join-iterator 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. data/README.rdoc +20 -1
  2. data/VERSION +1 -1
  3. data/join-iterator.gemspec +1 -1
  4. metadata +2 -2
data/README.rdoc CHANGED
@@ -1,6 +1,25 @@
1
1
  = join-iterator
2
2
 
3
- Description goes here.
3
+ Takes a few arrays and joins them by first element. Arrays must be sorted!
4
+
5
+ a = [[1,11], [2,11], [3,13]]
6
+ b = [[1,22], [3,23]]
7
+ c = [ [3,33]]
8
+
9
+ expected = [
10
+ [ 1, [11, 22, nil] ],
11
+ [ 2, [11, nil, nil] ],
12
+ [ 3, [13, 23, 33] ]
13
+ ]
14
+
15
+ result = []
16
+
17
+ join_sorted([a,b,c]) do |line|
18
+ result << line
19
+ end
20
+
21
+ result.should == expected
22
+
4
23
 
5
24
  == Contributing to join-iterator
6
25
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "join-iterator"
8
- s.version = "0.1.0"
8
+ s.version = "0.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Slava Vishnyakov"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: join-iterator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -122,7 +122,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
122
122
  requirements:
123
123
  - - ! '>='
124
124
  - !ruby/object:Gem::Version
125
- hash: 2722376012966211977
125
+ hash: -3864030799161971266
126
126
  version: '0'
127
127
  segments:
128
128
  - 0