General

Profile

jacobevelyn (Jacob Evelyn)

  • Login: jacobevelyn
  • Registered on: 06/04/2017
  • Last sign in: 06/30/2021

Issues

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

Activity

07/16/2020

04:31 PM Ruby Feature #11689: Add methods allow us to get visibility from Method and UnboundMethod object.
I'd also like to advocate for this. We're working on a gem that allows you to easily memoize a method while still preserving that method's visibility, and without `Method#visibility` we have to [awkwardly hack around it](https://github.c... jacobevelyn (Jacob Evelyn)

07/10/2020

04:09 PM Ruby Feature #16739: Allow Hash#keys and Hash#values to accept a block for filtering output
sawa (Tsuyoshi Sawada) wrote in #note-5:
> Includes a duplicate of #14788.
I just want to note that this is proposal is for a *more powerful* feature than what's proposed in #14788, because both the key and value would be available to t...
jacobevelyn (Jacob Evelyn)

03/25/2020

03:31 PM Ruby Feature #16739: Allow Hash#keys and Hash#values to accept a block for filtering output
> All it does is saves you from typing `select`. It does not look like the proposed feature makes much difference unless such situation is frequently met. Do you have any use case?
I see code that could be improved with this all the tim...
jacobevelyn (Jacob Evelyn)
01:49 PM Ruby Feature #14788: `Hash#keys` Could Accept a Block
Just noting that I have a similar (but different) proposal in #16739. jacobevelyn (Jacob Evelyn)

03/24/2020

09:00 PM Ruby Feature #16739 (Open): Allow Hash#keys and Hash#values to accept a block for filtering output
I often see code like the following:
``` ruby
hash.select { |_, v| v == :some_value }.keys
hash.keys.select { |k| k.nil? || k.even? }
hash.select { |k, v| valid_key?(k) && valid_value?(v) }.values
```
Each of these code snippet...
jacobevelyn (Jacob Evelyn)

09/07/2018

02:58 PM Ruby Bug #15087 (Closed): Segmentation fault with splat and block
The following code produces segmentation faults in Ruby 2.5.0, 2.5.1, and 2.6.0dev (2018-09-07 trunk 64656). This code worked in Ruby 2.4.1.
~~~ ruby
test_proc = Proc.new { "test" }
def foo(bar: 1, &block)
yield
end
foo(**{}, &...
jacobevelyn (Jacob Evelyn)

05/24/2018

04:46 PM Ruby Feature #14785: Parse guard statements like regular conditionals
Ah you're right Jeremy, I hadn't thought about that case. I still think it's unexpected though that in your example the behavior would change if we split the conditional into an `if...end`, but I don't know if others agree, and I don't k... jacobevelyn (Jacob Evelyn)
01:34 PM Ruby Feature #14785: Parse guard statements like regular conditionals
I agree the `did_you_mean` message is not good, but I would rather change the behavior so that line of code works and doesn't produce an error at all. jacobevelyn (Jacob Evelyn)

05/23/2018

02:58 PM Ruby Feature #14785 (Open): Parse guard statements like regular conditionals
I just learned that these two pieces of code are not the same:
~~~ ruby
def test
if result = calculate_result
return result
end
...
end
~~~
~~~ ruby
def test
return result if result = calculate_result
.....
jacobevelyn (Jacob Evelyn)

04/20/2018

01:40 PM Ruby Bug #14662: Stack consistency error in 2.5.1
Unfortunately I haven't found a way to reproduce this without a large portion of our code running, and because the error happens in different places I haven't been able to track it down. I'll keep trying but I think it is unlikely that I... jacobevelyn (Jacob Evelyn)

Also available in: Atom