mirror of
https://github.com/ruby/ruby.git
synced 2025-09-18 01:54:00 +02:00
merge revision(s) 8dfae85adb
: [Backport #17575]
Warn the defined location as deprecation as well as the main message [Bug #17575] --- test/ruby/test_defined.rb | 17 +++++++++++++++++ vm_method.c | 3 ++- 2 files changed, 19 insertions(+), 1 deletion(-)
This commit is contained in:
parent
d370cb62d2
commit
fb6cb226a0
3 changed files with 20 additions and 2 deletions
|
@ -2493,7 +2493,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");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue