General

Profile

Nondv (Dmitry Non)

  • Login: Nondv
  • Registered on: 07/24/2016
  • Last sign in: 11/11/2019

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 1 3 4

Activity

11/12/2019

08:12 PM Ruby master Feature #16341: Proposal: Set#to_proc and Hash#to_proc
shan (Shannon Skipper) wrote:
> This already works!
I can't believe I'm so oblivious :D
Nondv (Dmitry Non)
07:09 PM Ruby master Feature #16341: Proposal: Set#to_proc and Hash#to_proc
The main problem is that implicit conversion can be confusing, especially, if it's not obvious what the resulting pro... Nondv (Dmitry Non)
07:05 PM Ruby master Feature #16341: Proposal: Set#to_proc and Hash#to_proc
Speaking of hashes, they could implement implicit proc conversion as well:
```ruby
class Hash
def to_proc
...
Nondv (Dmitry Non)
06:58 PM Ruby master Feature #16341: Proposal: Set#to_proc and Hash#to_proc
This *is* a syntactic sugar. Using `&` + `to_proc` in this case is the same (not technically, but algorithmically, I ... Nondv (Dmitry Non)

11/11/2019

03:37 PM Ruby master Feature #16341: Proposal: Set#to_proc and Hash#to_proc
Well, to be fair, this change is just nice-to-have sugar. I don't expect it to become a thing.
I guess for now the...
Nondv (Dmitry Non)
03:18 PM Ruby master Feature #16341: Proposal: Set#to_proc and Hash#to_proc
Well, `to_proc` allows to send objects as blocks which can be quite useful not just in case of `select`/`reject`. Als... Nondv (Dmitry Non)
03:02 PM Ruby master Feature #16341 (Open): Proposal: Set#to_proc and Hash#to_proc
``` ruby
class Set
def to_proc
-> (x) { include?(x) } # or method(:include?).to_proc
end
end
```
Usa...
Nondv (Dmitry Non)

02/20/2018

03:24 PM Ruby master Feature #14498: Class#to_proc
Hanmac (Hans Mackowiak) wrote:
> Duplicate of #4910
>
> PS: might be a bit more complicated in C,
> but i would ...
Nondv (Dmitry Non)
03:01 PM Ruby master Feature #14498 (Rejected): Class#to_proc
Hello!
I was creating a list of class instances via `some_list.map { |e| SomeClass.new(e) }` and wondered if there...
Nondv (Dmitry Non)

02/17/2017

11:56 AM Ruby master Feature #13172: Method that yields object to block and returns result
.patch file Nondv (Dmitry Non)

Also available in: Atom