Project

General

Profile

Actions

Bug #22539

closed

Class#new shouldn't call refined initialize methods

Bug #22539: Class#new shouldn't call refined initialize methods
1

Added by byroot (Jean Boussier) about 7 hours ago. Updated about 7 hours ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:127442]

Description

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


Related issues 2 (0 open — 2 closed)

Related to Ruby - Feature #21254: Inlining Class#newClosedActions
Related to Ruby - Feature #22501: Optimize `Hash.new` and `String.new` in `opt_new`ClosedActions
Actions

Also available in: PDF Atom