utilities 0.0.4 → 0.0.5

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 (3) hide show
  1. data/lib/utilities.rb +6 -1
  2. data/lib/version.rb +1 -1
  3. metadata +3 -3
data/lib/utilities.rb CHANGED
@@ -13,9 +13,14 @@ class Range
13
13
  end
14
14
  alias_method :&, :intersection
15
15
 
16
+ # Verify if self is empty
17
+ def empty?
18
+ count.zero?
19
+ end
20
+
16
21
  # Detect if the two ranges overlap one with the other
17
22
  def overlap? range
18
- !(self & range).count.zero?
23
+ !(self & range).nil?
19
24
  end
20
25
  end
21
26
 
data/lib/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  class Utilities
2
2
  MAJOR = 0
3
3
  MINOR = 0
4
- BUILD = 4
4
+ BUILD = 5
5
5
 
6
6
  VERSION = "#{MAJOR}.#{MINOR}.#{BUILD}"
7
7
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: utilities
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
10
- version: 0.0.4
9
+ - 5
10
+ version: 0.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Christian Blais