End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
Warning.[]
Warning[category] → true or false
error.c
View on GitHub ↗
static VALUE
rb_warning_s_aref(VALUE mod, VALUE category)
{
rb_warning_category_t cat = rb_warning_category_from_name(category);
return RBOOL(rb_warning_category_enabled_p(cat));
}
Returns the flag to show the warning messages for category. Supported categories are:
:deprecated-
deprecation warnings
-
assignment of non-nil value to
$,and$; -
keyword arguments
-
proc/lambda without block
etc.
:experimental-
experimental features
-
Pattern matching