General

Profile

joel@drapper.me (Joel Drapper)

  • Login: joel@drapper.me
  • Email: joel@drapper.me
  • Registered on: 05/13/2022
  • Last sign in: 09/18/2025

Issues

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

Activity

08/01/2025

08:07 AM Ruby Bug #21525: Inconsistent execution order for methods with constant blocks
The behaviour is a little surprising if you don’t understand why it’s different in these cases. But no I can’t think of any non-pathological reason to actually do this in production code and I agree that the performance benefit is probab... joel@drapper.me (Joel Drapper)

07/31/2025

11:09 PM Ruby Bug #21525 (Closed): Inconsistent execution order for methods with constant blocks
If you call a method and pass in a splat of an array with a block argument coerced from calling a method, Ruby maintains the expected execution order and the called method receives a copy of the array prior to modification.
In this ex...
joel@drapper.me (Joel Drapper)

03/08/2023

12:14 PM Ruby Feature #19432: Introduce a wrapping operator (&) to Proc
Your examples of `strong` and `em` return a string but they don't buffer it anywhere. In order to use them like this `strong { em { text("Hello") } }`, they would need to buffer the opening tag, yield, and then buffer the closing tag.
*...
joel@drapper.me (Joel Drapper)
12:04 PM Ruby Feature #19484 (Open): Calling `binding` on a C-level proc raises an `ArgumentError`
Calling `binding` on a C-level proc (from `&:symbol`) raises an `ArgumentError`, "Can't create Binding from C level Proc" but there is no way to tell if a given proc is a C-level proc before calling `binding` on it. It’s possible to resc... joel@drapper.me (Joel Drapper)

02/11/2023

11:16 AM Ruby Feature #19432: Introduce a wrapping operator (&) to Proc
Yes, I included an example in the original description. If we need to wrap a Proc in another Proc, there doesn't seem to be a clean way to do that. My first thought was to use this pattern:
```ruby
when "text"
result = -> { text n...
joel@drapper.me (Joel Drapper)

02/10/2023

02:08 PM Ruby Feature #19432 (Feedback): Introduce a wrapping operator (&) to Proc
I don't know if this concept exists under another name, or whether there’s a technical term for it. I often find myself wanting to wrap a proc in another proc.
Here's a snippet from a recent example where a visitor class renders a Tip...
joel@drapper.me (Joel Drapper)

09/11/2022

10:45 AM Ruby Feature #18798: `UnboundMethod#==` with inherited classes
This would be really helpful for checking if a class has redefined a method inherited form a superclass.
As an example, I’m working on a compiler that replaces certain method calls with their inlined expected behaviour from an abstrac...
joel@drapper.me (Joel Drapper)

06/18/2022

05:28 PM Ruby Feature #18644: Coerce anything callable to a Proc
I really like the first option but unfortunately it would make every object respond to `to_proc` even when they don't respond to `call`. Perhaps a third option would be for the `&` prefix operator to try to coerce using `to_proc` and the... joel@drapper.me (Joel Drapper)

05/13/2022

11:32 AM Ruby Feature #17316: On memoization
I've been experimenting with doing memoization by passing a block to `attr_reader` / `attr_accessor`, e.g.
```ruby
attr_reader(:foo) { something_slow }
```
or
```ruby
attr_reader :foo do
something_slow
end
```
I prototyped this in ...
joel@drapper.me (Joel Drapper)

Also available in: Atom