[DOC] Remove outdated note from WeakRef#initialize

The note

> Raises an ArgumentError if the given +orig+ is immutable, such as Symbol,
> Integer, or Float.

has not been true since #2313 (GH-2313, Feature #16035) when
@casperisfine enabled storing non-finalizable objects in the underlying
`ObjectSpace::WeakMap`.

On Ruby 2.7+, `WeakRef.new(1) + 1` works fine and the result is the
expected 2.
This commit is contained in:
Ivo Anjo 2022-03-14 09:42:33 +00:00 committed by Jean Boussier
parent e859a218fd
commit 7348db866a
Notes: git 2022-03-14 18:51:14 +09:00
1 changed files with 0 additions and 3 deletions

View File

@ -30,9 +30,6 @@ class WeakRef < Delegator
##
# Creates a weak reference to +orig+
#
# Raises an ArgumentError if the given +orig+ is immutable, such as Symbol,
# Integer, or Float.
def initialize(orig)
case orig