diff options
author | Jeremy Evans <code@jeremyevans.net> | 2020-09-28 10:10:31 -0700 |
---|---|---|
committer | Jeremy Evans <code@jeremyevans.net> | 2020-12-18 09:54:11 -0800 |
commit | 05313c914b29f7027b27a91021ae2662f0149e54 (patch) | |
tree | 5c0b7276204a8ab9166befc9092cd45871a05aed /vm_method.c | |
parent | 6ced55b07cf00e4ce8ffac5762f10e8ff1ecc59b (diff) | |
download | ruby-05313c914b29f7027b27a91021ae2662f0149e54.tar.gz |
Use category: :deprecated in warnings that are related to deprecation
Also document that both :deprecated and :experimental are supported
:category option values.
The locations where warnings were marked as deprecation warnings
was previously reviewed by shyouhei.
Comment a couple locations where deprecation warnings should probably
be used but are not currently used because deprecation warning
enablement has not occurred at the time they are called
(RUBY_FREE_MIN, RUBY_HEAP_MIN_SLOTS, -K).
Add assert_deprecated_warn to test assertions. Use this to simplify
some tests, and fix failing tests after marking some warnings with
deprecated category.
Diffstat (limited to 'vm_method.c')
-rw-r--r-- | vm_method.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vm_method.c b/vm_method.c index e526ee0130..f1d6c84875 100644 --- a/vm_method.c +++ b/vm_method.c @@ -2450,7 +2450,8 @@ vm_respond_to(rb_execution_context_t *ec, VALUE klass, VALUE obj, ID id, int pri } else if (!NIL_P(ruby_verbose)) { VALUE location = rb_method_entry_location((const rb_method_entry_t *)cme); - rb_warn("%"PRIsVALUE"%c""respond_to?(:%"PRIsVALUE") uses" + rb_category_warn(RB_WARN_CATEGORY_DEPRECATED, + "%"PRIsVALUE"%c""respond_to?(:%"PRIsVALUE") uses" " the deprecated method signature, which takes one parameter", (FL_TEST(klass, FL_SINGLETON) ? obj : klass), (FL_TEST(klass, FL_SINGLETON) ? '.' : '#'), |