rmtools 1.3.1 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -23,11 +23,13 @@ It's still randomly documented since it's just my working tool.
23
23
 
24
24
  ### CHANGES
25
25
 
26
- ##### Version 1.3.1
26
+ ##### Version 1.3.2
27
27
 
28
28
  * Added to Array: #sort_along_by, #indices_map, #each_two
29
29
  * Enumerable#map_hash
30
- * Fixed Range#x? for neighbor digits, aliased as :intersects? and added XRange#intersects?
30
+ * Range
31
+ * * Fixed Range#x? for neighbor numbers and aliased as :intersects?
32
+ * * added XRange#intersects?
31
33
  * Class#__init__ accepts block, auto__init__ed Thread and Proc
32
34
 
33
35
  ##### Version 1.3.0
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rake'
2
2
  require './lib/rmtools/install'
3
3
  compile_manifest
4
4
 
5
- RMTOOLS_VERSION = '1.3.1'
5
+ RMTOOLS_VERSION = '1.3.2'
6
6
  begin
7
7
  require 'hoe'
8
8
  config = Hoe.spec 'rmtools' do |h|
@@ -33,6 +33,9 @@ class Range
33
33
  self - common | range - common
34
34
  end
35
35
 
36
+ # Statement about non-integers is made with presumption that float presentation of number is a neighborhood of it.
37
+ # Thus, "1.0" lies in the neighborhood of "1"; [0..1.0] is, mathematically, [0; 1) that not intersects with (1; 2]
38
+ # and thereby (0..1.0).x?(1.0..2) should be false, although (0..1).x?(1..2) should be true
36
39
  def x?(range)
37
40
  return range.x? self if range.is XRange
38
41
  range_end = range.include_end.end
@@ -70,7 +73,7 @@ class Range
70
73
  end
71
74
 
72
75
  def size
73
- Math.abs(last - first) + (!exclude_end?).to_i
76
+ (last - first).abs + (!exclude_end?).to_i
74
77
  end
75
78
 
76
79
  # Irrespective of include_end to be able to determne ranges created in any way
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rmtools
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: