mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
[DOC] Fix typos in ObjectSpace::WeakMap docs
The value of variable key2 should be "bar". This way, when nil is assigned to val1 and garbage collection occurs, the output of m.keys will then be ["bar"].
This commit is contained in:
parent
4dae4c6858
commit
b51e1c07d8
Notes:
git
2025-05-14 12:41:59 +00:00
Merged: https://github.com/ruby/ruby/pull/11442 Merged-By: nobu <nobu@ruby-lang.org>
1 changed files with 1 additions and 1 deletions
|
@ -1019,7 +1019,7 @@ wkmap_inspect(VALUE self)
|
|||
* val1 = Object.new
|
||||
* m[key1] = val1
|
||||
*
|
||||
* key2 = "foo"
|
||||
* key2 = "bar"
|
||||
* val2 = Object.new
|
||||
* m[key2] = val2
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue