Skip to content

Commit ac81c49

Browse files
ivoanjohsbt
authored andcommitted
[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.
1 parent c571c90 commit ac81c49

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

lib/weakref.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ class RefError < StandardError
3030

3131
##
3232
# Creates a weak reference to +orig+
33-
#
34-
# Raises an ArgumentError if the given +orig+ is immutable, such as Symbol,
35-
# Integer, or Float.
3633

3734
def initialize(orig)
3835
case orig

0 commit comments

Comments
 (0)