diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-12-17 14:52:15 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-12-19 09:52:16 +0900 |
commit | 9bf9de3d9d2f67bc401151fb94abf75b5eff5913 (patch) | |
tree | 94d1c981d7e604834c3ee9a5072f24a8fd199e63 /variable.c | |
parent | 76035e5bb6a5b44621fd1c11a0553780474d1c01 (diff) |
Made the warning for deprecated constants follow the category flag
Diffstat (limited to 'variable.c')
-rw-r--r-- | variable.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/variable.c b/variable.c index 74c4472910..4d5c9a6f54 100644 --- a/variable.c +++ b/variable.c @@ -2302,7 +2302,8 @@ rb_autoload_at_p(VALUE mod, ID id, int recur) MJIT_FUNC_EXPORTED void rb_const_warn_if_deprecated(const rb_const_entry_t *ce, VALUE klass, ID id) { - if (RB_CONST_DEPRECATED_P(ce)) { + if (RB_CONST_DEPRECATED_P(ce) && + rb_warning_category_enabled_p(RB_WARN_CATEGORY_DEPRECATED)) { if (klass == rb_cObject) { rb_warn("constant ::%"PRIsVALUE" is deprecated", QUOTE_ID(id)); } |