ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: nagachika00@gmail.com
To: ruby-core@ruby-lang.org
Subject: [ruby-core:99288] [Ruby master Bug#16826] ObjectSpace::WeakMap#key? returns false if value is nil
Date: Thu, 23 Jul 2020 04:51:09 +0000 (UTC)	[thread overview]
Message-ID: <redmine.journal-86677.20200723045109.772@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-16826.20200502131741.772@ruby-lang.org

Issue #16826 has been updated by nagachika (Tomoyuki Chikanaga).

Backport changed from 2.5: DONTNEED, 2.6: DONTNEED, 2.7: REQUIRED to 2.5: DONTNEED, 2.6: DONTNEED, 2.7: DONE

ruby_2_7 9da6470d7b3aa136b4b92469c8bbc522beb1ac31 merged revision(s) a2be428c5fec31b8adbd5ac087e7637ddf7e54d0.

----------------------------------------
Bug #16826: ObjectSpace::WeakMap#key? returns false if value is nil
https://bugs.ruby-lang.org/issues/16826#change-86677

* Author: Eregon (Benoit Daloze)
* Status: Closed
* Priority: Normal
* Assignee: Eregon (Benoit Daloze)
* ruby -v: ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-linux]
* Backport: 2.5: DONTNEED, 2.6: DONTNEED, 2.7: DONE
----------------------------------------
```
$ ruby -e 'map=ObjectSpace::WeakMap.new; map[:foo] = 4; p map; p map.key? :foo'  
#<ObjectSpace::WeakMap:0x000055fbe0c38c00: :foo => 4>
true # OK

$ ruby -e 'map=ObjectSpace::WeakMap.new; map[:foo] = nil; p map; p map.key? :foo'
#<ObjectSpace::WeakMap:0x000056371e3f86e8: :foo => nil>
false # BUG
```



-- 
https://bugs.ruby-lang.org/

      parent reply	other threads:[~2020-07-23  4:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-02 13:17 [ruby-core:98118] [Ruby master Bug#16826] ObjectSpace::WeakMap#key? returns false if value is nil eregontp
2020-05-02 14:06 ` [ruby-core:98119] " eregontp
2020-07-23  4:51 ` nagachika00 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.journal-86677.20200723045109.772@ruby-lang.org \
    --to=ruby-core@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).