ruby-changes:71410
From: Ivo <ko1@a...>
Date: Mon, 14 Mar 2022 18:51:14 +0900 (JST)
Subject: [ruby-changes:71410] 7348db866a (master): [DOC] Remove outdated note from WeakRef#initialize
https://git.ruby-lang.org/ruby.git/commit/?id=7348db866a From 7348db866a4120b701bf28918d6fcbd4d6f07121 Mon Sep 17 00:00:00 2001 From: Ivo Anjo <ivo.anjo@d...> Date: Mon, 14 Mar 2022 09:42:33 +0000 Subject: [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 https://github.com/ruby/ruby/blob/trunk/lib/weakref.rb#L30 ## # 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 -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/