Project

General

Profile

Actions

Bug #21112

closed

Typo in error message when an incorrect key is used with WeakKeyMap

Added by andrykonchin (Andrew Konchin) 18 days ago. Updated 9 days ago.

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

Description

The ObjectSpace::WeakKeyMap#[]= method raises exception when key is either Symbol, Numeric or true/false/nil but error message looks like a bit incorrect:

m = ObjectSpace::WeakKeyMap.new
m[:a] = 1
# 'ObjectSpace::WeakKeyMap#[]=': WeakKeyMap must be garbage collectable (ArgumentError)

The error message WeakKeyMap must be garbage collectable looks like should be WeakKeyMap key must be garbage collectable.

Actions #1

Updated by andrykonchin (Andrew Konchin) 18 days ago

  • Subject changed from Type in error message when an incorrect key is used with WeakKeyMap to Typo in error message when an incorrect key is used with WeakKeyMap
Actions #2

Updated by byroot (Jean Boussier) 18 days ago

  • Backport changed from 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN to 3.1: DONTNEED, 3.2: DONTNEED, 3.3: REQUIRED, 3.4: REQUIRED
Actions #3

Updated by byroot (Jean Boussier) 18 days ago

  • Status changed from Open to Closed

Applied in changeset git|91a10c07579f282a94e4b5830feaeca87f9a7dd3.


Fix a typo in WeakKeyMap argument error

[Bug #21112]

Updated by k0kubun (Takashi Kokubun) 9 days ago

  • Backport changed from 3.1: DONTNEED, 3.2: DONTNEED, 3.3: REQUIRED, 3.4: REQUIRED to 3.1: DONTNEED, 3.2: DONTNEED, 3.3: REQUIRED, 3.4: DONE
Actions

Also available in: Atom PDF

Like0
Like0Like0Like1Like0