From b51e1c07d84af189885f10a947e75497481c958d Mon Sep 17 00:00:00 2001 From: Andy Wong <36797624+topcminwer@users.noreply.github.com> Date: Fri, 23 Aug 2024 19:44:51 +0800 Subject: [PATCH] [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"]. --- weakmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weakmap.c b/weakmap.c index 76e5201356..ff205ff5f0 100644 --- a/weakmap.c +++ b/weakmap.c @@ -1019,7 +1019,7 @@ wkmap_inspect(VALUE self) * val1 = Object.new * m[key1] = val1 * - * key2 = "foo" + * key2 = "bar" * val2 = Object.new * m[key2] = val2 *