General

Profile

shugo (Shugo Maeda)

  • Login: shugo
  • Registered on: 05/08/2008
  • Last sign in: 11/10/2026

Issues

open closed Total
Assigned issues 3 159 162
Reported issues 3 95 98

Projects

Project Roles Registered on
Ruby Committer, Infrastructure team 05/28/2008

Activity

11/10/2026

06:33 AM Ruby Feature #22501: Optimize `Hash.new` and `String.new` in `opt_new`
The intended behavior is that a refinement of `#initialize` does not affect `new`.
That said, I'm fine with making it implementation-defined if that helps optimizations like `opt_new`.
shugo (Shugo Maeda)

11/02/2026

01:44 AM Ruby Bug #22462: For UnboundMethod, super_method.bind and bind.super_method should return an equal Method
jeremyevans0 (Jeremy Evans) wrote in #note-2:
> Since the behavior for the two UnboundMethods is different, I think it makes sense that they are considered unequal.
I agree that `ua` and `ub` in my example behave differently.
Howeve...
shugo (Shugo Maeda)

10/22/2026

09:55 AM Ruby Bug #22462: For UnboundMethod, super_method.bind and bind.super_method should return an equal Method
As I commented in https://github.com/ruby/ruby/pull/19474#pullrequestreview-5609342827, with the PR change, `==` UnboundMethods can bind to non-`==` Methods:
```ruby
module M; def m = [:M, *super]; end
class Base; def m = [:Base]; e...
shugo (Shugo Maeda)

10/10/2026

06:09 AM Ruby Feature #22309: Allow super in a module method to work if method was called by refinement method super
Thank you. I've confirmed that the leak is gone and that crefs with the same refinements now share iclasses, and I've approved https://github.com/ruby/ruby/pull/18910. shugo (Shugo Maeda)

10/09/2026

05:19 AM Ruby Feature #22309: Allow super in a module method to work if method was called by refinement method super
Sorry for the confusing wording. By "the other refinements" I meant the other refinements in the chain copied from the caller's cref, which `vm_search_normal_superclass` skips since d3774085aa. The refinements in scope at the `super` cal... shugo (Shugo Maeda)

10/07/2026

08:15 AM Ruby Feature #22392 (Rejected): Allow refinements to define && and ||
Thank you for the discussion at the developer meeting.
At the meeting, mame suggested an alternative: `lhs && rhs` as `lhs.&&() { rhs }`, which I had rejected myself before proposing this.
Anyway, I understand that it is difficult to...
shugo (Shugo Maeda)
06:52 AM Ruby Feature #22309: Allow super in a module method to work if method was called by refinement method super
One addition: since the cache is a Hash, refinements and their iclasses would be retained even after they are no longer needed. Making both the key and the value weak would avoid this; maybe `ObjectSpace::WeakMap` in weakmap.c could be u... shugo (Shugo Maeda)
03:52 AM Ruby Feature #22309: Allow super in a module method to work if method was called by refinement method super
I have approved https://github.com/ruby/ruby/pull/18910, but there is one thing I am concerned about.
The cache entries are keyed by the refinement iclass of each cref and never removed, so each `using` scope or `Proc#refined` copy that...
shugo (Shugo Maeda)

10/02/2026

12:35 PM Ruby Feature #22392: Allow refinements to define && and ||
alanwu (Alan Wu) wrote in #note-6:
> BTW, the cost analysis to non-users is incomplete in the PoC.
You're right that the analysis is incomplete.
As you say, a parse-time switch would be ideal, but I cannot think of a way to do that ...
shugo (Shugo Maeda)
02:28 AM Ruby Misc #22394: DevMeeting-2026-10-07
* [Feature #22392] Allow refinements to define && and || (shugo)
* I propose to allow `&&` and `||` to be defined in refinements, so that DSLs can write `where { name == "x" && age > 20 }` instead of `where { (name == "x") & (age > 20...
shugo (Shugo Maeda)

Also available in: Atom