rmtools 1.3.1 → 1.3.2
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.
- data/README.md +4 -2
- data/Rakefile +1 -1
- data/lib/rmtools/enumerable/range.rb +4 -1
- metadata +1 -1
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.
|
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
|
-
*
|
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
@@ -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
|
-
|
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
|