lucascaton (Lucas Caton)
- Login: lucascaton
- Email: lucascaton@gmail.com
- Registered on: 10/15/2013
- Last sign in: 03/22/2018
Issues
| open | closed | Total | |
|---|---|---|---|
| Assigned issues | 0 | 0 | 0 |
| Reported issues | 0 | 3 | 3 |
Activity
09/25/2017
-
03:29 AM Ruby Bug #13937 (Rejected): ARGV doesn't behave like an array
- Ruby allows us to access an array item by passing its index, regardless if there is or not a space between the array and the [] with the index.
Ie.: both of the following lines work:
~~~ ruby
[][0] # nil
[] [0] # nil
~~~
**ARGV...
03/27/2016
-
08:02 AM Ruby Bug #12221 (Rejected): Enumerable#sort_by method doesn't work properly when the array has more than 6 elements and you pass nil to the block
- ~~~
%w(1 2).sort_by { |i| nil }
# => ["1", "2"]
# ...
%w(1 2 3 4 5 6).sort_by { |i| nil }
# => ["1", "2", "3", "4", "5", "6"]
~~~
So far, so good...
But look what happens when you have 7 or more elements:
~~~
%w(1 2 3 4...
10/15/2013
-
12:35 PM Ruby Bug #9022 (Rejected): all? method in empty array should return false
- This is expected:
[].any?(&:whatever?)
# => false
But this is not the behavior which I expect:
[].all?(&:whatever?)
# => true
Do you agree with me?