From: "k0kubun (Takashi Kokubun) via ruby-core" Date: 2026-11-16T18:01:24+00:00 Subject: [ruby-core:127526] [Ruby Bug#22539] Class#new shouldn't call refined initialize methods Issue #22539 has been updated by k0kubun (Takashi Kokubun). Backport changed from 3.3: DONTNEED, 3.4: DONTNEED, 4.0: REQUIRED to 3.3: DONTNEED, 3.4: DONTNEED, 4.0: DONE ruby_4_0 commit:676053ab56dee9a424790c71927ae4ed705f9d7c merged revision(s) commit:db22451d7e1fcb04f033436fe099b0f0489d70d6. ---------------------------------------- Bug #22539: Class#new shouldn't call refined initialize methods https://bugs.ruby-lang.org/issues/22539#change-119994 * Author: byroot (Jean Boussier) * Status: Closed * Backport: 3.3: DONTNEED, 3.4: DONTNEED, 4.0: DONE ---------------------------------------- Since the introduction of `opt_new` in [Feature #21254], if a class's `initialize` method is refined, the refined version is called. That's not the case when disabling compiler optimizations, or calling `new` with `send`. After putting in on the dev meeting agenda [Misc #22417], it has been decided that `new` shouldn't call refined initialize. PR: https://github.com/ruby/ruby/pull/19857 -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/