first_non_nil 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/first_non_nil.rb +1 -0
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d1462874dc5caac732cd9926672686dc33a9cef9
4
- data.tar.gz: 13f6581be04b44ca259fb2e07ff4ad2b209e3a9a
3
+ metadata.gz: 5aeae6a0d7a2c3004b8a603d9f2239111af8fb1b
4
+ data.tar.gz: 0c55017d4122371c9e37727d9ff348f80b5bd031
5
5
  SHA512:
6
- metadata.gz: 74ec5653bf706522a81003ccf51b0b1436f41d1b4c4d301f38d85314e9ebec4a4c70313131d5d032fd090f4be85cc4a8300e66b0ecf309a73e6405314a189038
7
- data.tar.gz: 9e0460f70db3de766bbc88c8e94a9fe1217a3b1d35b50f32ab6185c603294a1da236faa2df94080af56709425aa6641bba992d3e72b0a44bb067f60b822fd9f2
6
+ metadata.gz: fdfbe0a5c22c3df7255eb848d08f9e3dc7c8e0fd30976d191762f4ef0e52e44eadd8fd451248c7a6c4c8de41cdc694654397ed4da76fc928482e2cc6874a7846
7
+ data.tar.gz: 89f0f9b75cf70a01d27552621e9220a67f3db66cfebd3611ce7d78319801793681bd13e1779f65bf1f42900f1d24fb60fff3a5841b7deea84dfa0d49cbe05466
data/lib/first_non_nil.rb CHANGED
@@ -4,5 +4,6 @@ class Array
4
4
  result = block_given? ? yield(element) : element
5
5
  return result unless result.nil?
6
6
  end
7
+ nil
7
8
  end
8
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: first_non_nil
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Carlin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-20 00:00:00.000000000 Z
11
+ date: 2016-12-26 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Return the first element of an array that is not nil or, if given a block,
14
14
  the first non-nil result of the given block.