General

Profile

jgomo3 (Jesús Gómez)

  • Login: jgomo3
  • Registered on: 03/01/2020
  • Last sign in: 09/06/2023

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 1 1 2

Activity

09/06/2023

12:17 PM Ruby Bug #19864: Ruby 3.2 Changed Behavior With One Sided Ranges
I tested the idea with whole numbers, and it doesn't fail.
I tested the idea with dates not in the extremes, and it DOES fail.
Attached 2 examples.
The first one using numbers:
```
(..0) === 0
```
Which works fine both i...
jgomo3 (Jesús Gómez)

03/31/2023

11:03 PM Ruby Bug #19566 (Closed): OptionParser::on raises unsupported argument type: URI (ArgumentError) but shouldn't
The documentation says
> OptionParser comes with a few ready-to-use kinds of type coercion. They are
> ...
But when I try to use the class `URI` as a coercion class:
```
op = OptionParser.new
op.on("--uri URI", URI)
```
I g...
jgomo3 (Jesús Gómez)

03/03/2020

03:40 PM Ruby Feature #16667: Allow parameters to Symbol#to_proc and Method#to_proc
Hanmac (Hans Mackowiak) wrote in #note-8:
> @jgomo3 i found my old Symbol#call code
> ...
Great helper.
Well, that is another way.
So yes, the whole point of this ticket is to propose to allow that kind of expressions.
In other words,...
jgomo3 (Jesús Gómez)
01:37 PM Ruby Feature #16667: Allow parameters to Symbol#to_proc and Method#to_proc
Hanmac (Hans Mackowiak) wrote in #note-5:
> i tried `ary.map.with_object(:id,&:dig)` but it just returned `:id`
> ...
Amazing this approach.
Sadly, it will work only for Arity-1 functions.
If you want to dig more, how to do it? e.g, su...
jgomo3 (Jesús Gómez)
12:56 PM Ruby Feature #16667: Allow parameters to Symbol#to_proc and Method#to_proc
sawa (Tsuyoshi Sawada) wrote in #note-4:
> I already know that. That does not make `ary.map(:dig.to_proc(:id))` work. You seemed to have missed my point.
Ok, it would be actually `ary.map(&:dig.to_proc(:id))`.
But that is not the impor...
jgomo3 (Jesús Gómez)

03/02/2020

08:14 PM Ruby Feature #16667: Allow parameters to Symbol#to_proc and Method#to_proc
> I am not sure how allowing parameters to Symbol#to_proc and Method#to_proc would make:
> ...
Currently, **to_proc** on symbols creates a **Proc** that receives an object and calls on it the method with name equal to the symbol.
The id...
jgomo3 (Jesús Gómez)

03/01/2020

04:07 PM Ruby Feature #16667 (Open): Allow parameters to Symbol#to_proc and Method#to_proc
Allow parameters to Symbol#to_proc and Method#to_proc
So we can say:
``` ruby
ary.map(:dig.to_proc(:id))
```
Instead of
``` ruby
ary.map { |e| e.dig(:id) }
```
Oppening the posibilities to refine the `&` operator i...
jgomo3 (Jesús Gómez)

Also available in: Atom