nrser 0.2.0.pre.2 → 0.2.0.pre.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d333e4365b8a602c7c37dfb2bb8d9d1fb4533b2
|
4
|
+
data.tar.gz: c2b83a1a3e201f075ac415fc8e73d93ae0f54c21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3dca07c74fba696a9bbcc5f174d2cc0564f48269a3fda97b524e5df2c5b66248fd1227bb1a2076e38ddd1cc1812b284992907a30e6410f481d10bcd323860e6c
|
7
|
+
data.tar.gz: 448b8dd4597d4451c7227d829d216cca26801a17fabc5e5bc02003ac1e96091e0a835ca905f162b0cdfa88674ba614c1725e35691ca5aba3e693f93a2fb762f6
|
@@ -61,7 +61,9 @@ module NRSER
|
|
61
61
|
|
62
62
|
# See if every entry in the slice from `enum` matches the corresponding
|
63
63
|
# one in `slice`
|
64
|
-
return true if enum_slice.zip( slice ).all?(
|
64
|
+
return true if enum_slice.zip( slice ).all? { |(enum_entry, slice_entry)|
|
65
|
+
is_match.call enum_entry, slice_entry
|
66
|
+
}
|
65
67
|
|
66
68
|
# Otherwise, just continue on through `enum` looking for that first
|
67
69
|
# match until the number of `enum` entries left is too few for `slice`
|
data/lib/nrser/version.rb
CHANGED
@@ -6,19 +6,19 @@ describe_spec_file(
|
|
6
6
|
|
7
7
|
it "returns the element when only one is found" do
|
8
8
|
expect(
|
9
|
-
subject.
|
9
|
+
subject.( [1, 2, 3] ) { |i| i == 2 }
|
10
10
|
).to be 2
|
11
11
|
end
|
12
12
|
|
13
13
|
it "raises TypeError when more than one element is found" do
|
14
14
|
expect {
|
15
|
-
subject.
|
15
|
+
subject.( [1, 2, 3] ) { |i| i >= 2 }
|
16
16
|
}.to raise_error TypeError
|
17
17
|
end
|
18
18
|
|
19
19
|
it "raises TypeError when no elements are found" do
|
20
20
|
expect {
|
21
|
-
subject.
|
21
|
+
subject.( [1, 2, 3] ) { |i| false }
|
22
22
|
}.to raise_error TypeError
|
23
23
|
end
|
24
24
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nrser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.0.pre.
|
4
|
+
version: 0.2.0.pre.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- nrser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hamster
|