sunnyrjuneja (Sunny Juneja)
- Login: sunnyrjuneja
- Registered on: 05/16/2018
- Last sign in: 05/16/2018
Issues
| open | closed | Total | |
|---|---|---|---|
| Assigned issues | 0 | 0 | 0 |
| Reported issues | 0 | 1 | 1 |
Activity
05/16/2018
-
04:41 AM Ruby Feature #14763: Allow more Enumerable methods to accept method names as symbol arguments
- sawa (Tsuyoshi Sawada) wrote:
> I think `reduce` or `inject` taking a method name as an argument was convenient in the old days when symbol to proc was not available. Today, you can just add an ampersand in front of the method name.
> ... -
04:05 AM Ruby Feature #14763: Allow more Enumerable methods to accept method names as symbol arguments
- Hey Shevegen,
Thank you for your comments. I really apperciate them! I'll respond inline:
shevegen (Robert A. Heiler) wrote:
> Is there any reason why you did use ":even?" rather
> ...
The only reason I used :even? rather than :e... -
02:02 AM Ruby Feature #14763 (Closed): Allow more Enumerable methods to accept method names as symbol arguments
- Enumerable has a short hand which accepts method names as symbols.
```ruby
(5..10).reduce(:+) #=> 45
```
I'm proposing we allow the same functionality for #any?, #all?, #find, #reject, #select, #one?, #find_index. I'm requesting th...