From: "byroot (Jean Boussier) via ruby-core" Date: 2026-11-12T11:04:23+00:00 Subject: [ruby-core:127442] [Ruby Bug#22539] Class#new shouldn't call refined initialize methods Issue #22539 has been reported by byroot (Jean Boussier). ---------------------------------------- Bug #22539: Class#new shouldn't call refined initialize methods https://bugs.ruby-lang.org/issues/22539 * Author: byroot (Jean Boussier) * Status: Open * Backport: 3.3: DONTNEED, 3.4: DONTNEED, 4.0: REQUIRED ---------------------------------------- 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. -- 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/