diff options
author | Ivo Anjo <[email protected]> | 2022-03-14 09:42:33 +0000 |
---|---|---|
committer | Jean Boussier <[email protected]> | 2022-03-14 10:50:52 +0100 |
commit | 7348db866a4120b701bf28918d6fcbd4d6f07121 (patch) | |
tree | e9936c080b5ec9d8bb81e264a353ae383c4875e5 /lib | |
parent | e859a218fd9a71c521b62df9447ab3c7104eb71f (diff) |
[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.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/5657
Diffstat (limited to 'lib')
-rw-r--r-- | lib/weakref.rb | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/lib/weakref.rb b/lib/weakref.rb index fbd5d8fa82..78aad1f96e 100644 --- a/lib/weakref.rb +++ b/lib/weakref.rb @@ -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 |