ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: nobu@ruby-lang.org
To: ruby-core@ruby-lang.org
Subject: [ruby-core:91541] [Ruby trunk Bug#15597] syscall not returning true from private_method_defined?
Date: Thu, 14 Feb 2019 04:13:03 +0000 (UTC)	[thread overview]
Message-ID: <redmine.journal-76804.20190214041301.ec2795ad6063ccca@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-15597.20190210202856@ruby-lang.org

Issue #15597 has been updated by nobu (Nobuyoshi Nakada).

Status changed from Feedback to Rejected

It's same as that `respond_to?(:syscall, true)` returns `false`.

----------------------------------------
Bug #15597: syscall not returning true from private_method_defined?
https://bugs.ruby-lang.org/issues/15597#change-76804

* Author: AaronLasseigne (Aaron Lasseigne)
* Status: Rejected
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
`syscode` is a private method on `Object` but when checked with `private_method_defined?` it returns `false`.

Ruby 2.6.1
```
irb(main):001:0> Object.new.private_methods.sort.select { |pm| !Object.private_method_defined?(pm) }
=> [:syscall]
```

Ruby 2.5.3
```
irb(main):001:0> Object.new.private_methods.sort.select { |pm| !Object.private_method_defined?(pm) }
=> []
```



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

  parent reply	other threads:[~2019-02-14  4:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <redmine.issue-15597.20190210202856@ruby-lang.org>
2019-02-10 20:28 ` [ruby-core:91505] [Ruby trunk Bug#15597] syscall not returning true from private_method_defined? aaron.lasseigne
2019-02-11  6:57 ` [ruby-core:91507] " nobu
2019-02-13  4:44 ` [ruby-core:91527] " aaron.lasseigne
2019-02-13 14:57 ` [ruby-core:91531] " hanmac
2019-02-14  4:13 ` nobu [this message]
2019-02-14 12:30 ` [ruby-core:91547] " hanmac

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-76804.20190214041301.ec2795ad6063ccca@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).