Manage deprecation warning by the flag
This commit is contained in:
parent
58527a7926
commit
d2ac6d4d9f
@ -7108,8 +7108,10 @@ check_yield_place(const rb_iseq_t *iseq, int line)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
case ISEQ_TYPE_CLASS:
|
case ISEQ_TYPE_CLASS:
|
||||||
file = rb_iseq_path(iseq);
|
file = rb_iseq_path(iseq);
|
||||||
rb_compile_warn(RSTRING_PTR(file), line,
|
if (rb_warning_category_enabled_p(RB_WARN_CATEGORY_DEPRECATED)) {
|
||||||
"`yield' in class syntax will not be supported from Ruby 3.0. [Feature #15575]");
|
rb_compile_warn(RSTRING_PTR(file), line,
|
||||||
|
"`yield' in class syntax will not be supported from Ruby 3.0. [Feature #15575]");
|
||||||
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
default:
|
default:
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user