Actions
Bug #21112
closedTypo 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
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