Project

General

Profile

Actions

Feature #22135

open

Remove obsolete `ObjectSpace#_id2ref`

Feature #22135: Remove obsolete `ObjectSpace#_id2ref`
2

Added by nobu (Nobuyoshi Nakada) 6 days ago. Updated 4 days ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:125882]

Description

As a result of [Feature #15408], the ObjectSpace#_id2ref method has been deprecated and now triggers a warning.
However, we recognize that its use had already been discouraged for a long time prior to this, and we believe it is rarely used nowadays.
Are there any objections to removing this method in version 4.1?

GH-17577

Updated by nobu (Nobuyoshi Nakada) 6 days ago Actions #1

  • Subject changed from Remove deprecated `ObjectSpace#_id2ref` to Remove obsolete `ObjectSpace#_id2ref`

Updated by byroot (Jean Boussier) 6 days ago 3Actions #2 [ruby-core:125888]

👍 this is a lot of complex and error prone code to support a deprecated feature. Very little gems ever used _id2ref and nowadays it's always advantageously replaced by a WeakMap.

Updated by jhawthorn (John Hawthorn) 4 days ago Actions #3 [ruby-core:125917]

+1 I would love to see this gone, we have to do a fair bit of work in the GC and elsewhere to maintain the id2ref table.

Actions

Also available in: PDF Atom