summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvo Anjo <ivo.anjo@datadoghq.com>2022-03-14 09:42:33 +0000
committerJean Boussier <jean.boussier@gmail.com>2022-03-14 10:50:52 +0100
commit7348db866a4120b701bf28918d6fcbd4d6f07121 (patch)
treee9936c080b5ec9d8bb81e264a353ae383c4875e5
parente859a218fd9a71c521b62df9447ab3c7104eb71f (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
-rw-r--r--lib/weakref.rb3
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