From 7348db866a4120b701bf28918d6fcbd4d6f07121 Mon Sep 17 00:00:00 2001 From: Ivo Anjo Date: Mon, 14 Mar 2022 09:42:33 +0000 Subject: [PATCH] [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. --- lib/weakref.rb | 3 --- 1 file changed, 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