diff options
author | Nobuyoshi Nakada <[email protected]> | 2019-12-22 15:18:22 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2019-12-22 15:18:44 +0900 |
commit | d76c8cfecdaa2960153b5b24ccd0d61f9af60abd (patch) | |
tree | 9d4cd5539cde7193fd6c80a37459b8eaad8c4d3f /error.c | |
parent | d2ac6d4d9f57b34eeb94bd6302b54a632051ce64 (diff) |
RDoc of Warning.[] and .[]= [Feature #16345] [ci skip]
Diffstat (limited to 'error.c')
-rw-r--r-- | error.c | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -166,6 +166,23 @@ rb_warning_category_enabled_p(rb_warning_category_t 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 rb_warning_s_aref(VALUE mod, VALUE category) { @@ -175,6 +192,14 @@ rb_warning_s_aref(VALUE mod, VALUE category) return Qfalse; } +/* + * call-seq + * Warning[category] = flag -> flag + * + * Sets the warning flags for +category+. + * See Warning.[] for the categories. + */ + static VALUE rb_warning_s_aset(VALUE mod, VALUE category, VALUE flag) { |