From: naruse@airemix.jp
To: ruby-core@ruby-lang.org
Subject: [ruby-core:100955] [Ruby master Feature#17143] Improve support for warning categories
Date: Fri, 20 Nov 2020 05:07:56 +0000 (UTC) [thread overview]
Message-ID: <redmine.journal-88612.20201120050755.1604@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-17143.20200903000420.1604@ruby-lang.org
Issue #17143 has been updated by naruse (Yui NARUSE).
In regard to #17055, Instead of new feature to suppress warning, how about assuming `@foo = nil` is that. `instance_variable_get` and so on should also be mimicked.
----------------------------------------
Feature #17143: Improve support for warning categories
https://bugs.ruby-lang.org/issues/17143#change-88612
* Author: jeremyevans0 (Jeremy Evans)
* Status: Open
* Priority: Normal
----------------------------------------
Support was recently added for Warning.warn to accept a `category` keyword. However, the initial implementation was limited to having `rb_warn_deprecated` and `rb_warn_deprecated_to_remove` use the `:deprecated` value for the `category` keyword.
It doesn't make sense to me to have a `category` keyword if it is only used for deprecation, so I propose we extend the support so that `Kernel#warn` accepts a category keyword (for Ruby-level warnings) and `rb_category_warn` and `rb_category_warning` functions be added to the C-API (for C-level warnings). I also propose that we change existing `rb_warn` and `rb_warning` calls to `rb_category_warn` and `rb_category_warning`, so that all warnings issued by core Ruby are issued with an appropriate category.
I have implemented support for this in a pull request: https://github.com/ruby/ruby/pull/3508
--
https://bugs.ruby-lang.org/
next prev parent reply other threads:[~2020-11-20 5:08 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-03 0:04 [ruby-core:99856] [Ruby master Feature#17143] Improve support for warning categories merch-redmine
2020-09-23 4:57 ` [ruby-core:100080] " ko1
2020-09-23 5:35 ` [ruby-core:100082] " merch-redmine
2020-09-23 17:44 ` [ruby-core:100088] " ko1
2020-09-23 18:01 ` [ruby-core:100089] " merch-redmine
2020-09-25 4:58 ` [ruby-core:100119] " matz
2020-09-25 5:04 ` [ruby-core:100120] " shyouhei
2020-09-25 19:43 ` [ruby-core:100158] " merch-redmine
2020-09-25 22:06 ` [ruby-core:100162] " merch-redmine
2020-09-30 15:12 ` [ruby-core:100238] " merch-redmine
2020-10-26 7:50 ` [ruby-core:100560] " matz
2020-10-26 15:59 ` [ruby-core:100577] " merch-redmine
2020-11-20 5:07 ` naruse [this message]
2020-11-20 5:28 ` [ruby-core:100956] " merch-redmine
2020-11-20 5:31 ` [ruby-core:100957] " shyouhei
2020-11-20 13:05 ` [ruby-core:100977] " nobu
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-88612.20201120050755.1604@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).