Maintenance Ruby 3.3 gets fixes, but no new features. 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
etc.
-
:experimental-
experimental features
-
Pattern matching
-
:performance-
performance hints
-
Shape variation limit
-