rmtools 2.2.3 → 2.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +6 -1
- data/lib/rmtools/enumerable/range.rb +2 -2
- data/lib/rmtools/version.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -27,7 +27,7 @@ It's still randomly documented since it's just my working tool.
|
|
27
27
|
|
28
28
|
### CHANGES
|
29
29
|
|
30
|
-
##### Version 2.2.
|
30
|
+
##### Version 2.2.4
|
31
31
|
|
32
32
|
* Hash
|
33
33
|
* #key_value = to_a.first
|
@@ -39,6 +39,11 @@ It's still randomly documented since it's just my working tool.
|
|
39
39
|
* Dir
|
40
40
|
* Fixed #content for dirs with dotted files only
|
41
41
|
* #content now accepts :recursive and :include_dot options turned off by default
|
42
|
+
|
43
|
+
* Range
|
44
|
+
* #min/#max return #first/#last if called with no block
|
45
|
+
|
46
|
+
* Removed "-module" ld_flag from extconf.rb
|
42
47
|
|
43
48
|
##### Version 2.2.2
|
44
49
|
|
@@ -187,7 +187,7 @@ class Range
|
|
187
187
|
|
188
188
|
# minimum of monotone function definition interval
|
189
189
|
def min(&fun)
|
190
|
-
return first if yield first
|
190
|
+
return first if !fun or yield first
|
191
191
|
return unless yield last
|
192
192
|
if yield(c = center)
|
193
193
|
(first+1..c-1).min(&fun) || c
|
@@ -198,7 +198,7 @@ class Range
|
|
198
198
|
|
199
199
|
# maximum of monotone function definition interval
|
200
200
|
def max(&fun)
|
201
|
-
return last if yield last
|
201
|
+
return last if !fun or yield last
|
202
202
|
return unless yield first
|
203
203
|
if yield(c = center)
|
204
204
|
(c+1..last-1).max(&fun) || c
|
data/lib/rmtools/version.rb
CHANGED