helfper (Helder Pereira)
- Login: helfper
- Email: helfper@gmail.com
- Registered on: 08/20/2015
- Last sign in: 08/20/2015
Issues
open | closed | Total | |
---|---|---|---|
Assigned issues | 0 | 0 | 0 |
Reported issues | 0 | 0 | 0 |
Activity
08/21/2015
- 01:31 AM Ruby master Bug #11471: min, min_by, max, max_by with optional parameter return a wrong value
- Here is my fix.
I also created a pull request:
https://github.com/ruby/ruby/pull/1005
08/20/2015
- 10:30 PM Ruby master Bug #11471: min, min_by, max, max_by with optional parameter return a wrong value
- Yes, I was wrong. I missed this check in "nmin_filter":
~~~
if (data->curlen <= data->n)
return;
~~... - 09:30 PM Ruby master Bug #11471: min, min_by, max, max_by with optional parameter return a wrong value
- I suppose I found the problem. Taking the first example:
~~~
[20, 32, 32, 21, 30, 25, 29, 13, 14].min(2)
~~~
... - 09:24 PM Ruby master Bug #11471: min, min_by, max, max_by with optional parameter return a wrong value
- Leo Correa, I think your patch will fail for this example:
~~~
[2, 4, 8, 6, 7].min(4) #=> [2, 4, 6, 8]
~~~
Also available in: Atom