RDoc of Warning.[] and .[]= [Feature #16345] [ci skip]
This commit is contained in:
parent
d2ac6d4d9f
commit
d76c8cfecd
25
error.c
25
error.c
@ -166,6 +166,23 @@ rb_warning_category_enabled_p(rb_warning_category_t category)
|
|||||||
return !(warning_disabled_categories & (1U << category));
|
return !(warning_disabled_categories & (1U << category));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* call-seq
|
||||||
|
* Warning[category] -> true or false
|
||||||
|
*
|
||||||
|
* Returns the flag to show the warning messages for +category+.
|
||||||
|
* Supported categories are:
|
||||||
|
*
|
||||||
|
* +:deprecated+ :: deprecation warnings
|
||||||
|
* * assignemnt of non-nil value to <code>$,</code> and <code>$;</code>
|
||||||
|
* * keyword arguments
|
||||||
|
* * proc/lambda without block
|
||||||
|
* etc.
|
||||||
|
*
|
||||||
|
* +:experimental+ :: experimental features
|
||||||
|
* * Pattern matching
|
||||||
|
*/
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
rb_warning_s_aref(VALUE mod, VALUE category)
|
rb_warning_s_aref(VALUE mod, VALUE category)
|
||||||
{
|
{
|
||||||
@ -175,6 +192,14 @@ rb_warning_s_aref(VALUE mod, VALUE category)
|
|||||||
return Qfalse;
|
return Qfalse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* call-seq
|
||||||
|
* Warning[category] = flag -> flag
|
||||||
|
*
|
||||||
|
* Sets the warning flags for +category+.
|
||||||
|
* See Warning.[] for the categories.
|
||||||
|
*/
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
rb_warning_s_aset(VALUE mod, VALUE category, VALUE flag)
|
rb_warning_s_aset(VALUE mod, VALUE category, VALUE flag)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user