Project

General

Profile

Actions

Bug #21112

closed

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

Bug #21112: Typo in error message when an incorrect key is used with WeakKeyMap

Added by andrykonchin (Andrew Konchin) 9 months ago. Updated 7 months 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.

Updated by andrykonchin (Andrew Konchin) 9 months ago Actions #1

  • 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

Updated by byroot (Jean Boussier) 9 months ago Actions #2

  • 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

Updated by byroot (Jean Boussier) 9 months ago Actions #3

  • 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) 8 months ago Actions #4 [ruby-core:121029]

  • 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

Updated by nagachika (Tomoyuki Chikanaga) 7 months ago Actions #5 [ruby-core:121269]

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

Also available in: PDF Atom