summaryrefslogtreecommitdiff
path: root/vm_method.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-01-23 19:57:07 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-01-23 19:58:39 +0900
commit8dfae85adb96cf3da84bf38f2103969d4a7aed3f (patch)
tree8340fd057bce7a8db057d8bf3fc9795539b9fb92 /vm_method.c
parent62283f7a7a87fa2f353814a3ef6a3b1cab2a32b8 (diff)
Warn the defined location as deprecation as well as the main message
[Bug #17575]
Diffstat (limited to 'vm_method.c')
-rw-r--r--vm_method.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/vm_method.c b/vm_method.c
index c4eb3dd611..dd00e524eb 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -2503,7 +2503,8 @@ vm_respond_to(rb_execution_context_t *ec, VALUE klass, VALUE obj, ID id, int pri
VALUE path = RARRAY_AREF(location, 0);
VALUE line = RARRAY_AREF(location, 1);
if (!NIL_P(path)) {
- rb_compile_warn(RSTRING_PTR(path), NUM2INT(line),
+ rb_category_compile_warn(RB_WARN_CATEGORY_DEPRECATED,
+ RSTRING_PTR(path), NUM2INT(line),
"respond_to? is defined here");
}
}