summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-08-31 14:58:31 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-09-25 09:50:33 +0900
commit996af2ce086249e904b2ce95ab2fcd1de7d757be (patch)
tree1b70f747a0eefc32be13f05bdb037275d1e664a1 /error.c
parent83ff0f74bf69650754cac020bcd4ff9adbba877e (diff)
Disable deprecation warning by the default [Feature #16345]
And `-w` option turns it on.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3481
Diffstat (limited to 'error.c')
-rw-r--r--error.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/error.c b/error.c
index 6a9aa2f2c3..9f8cdf8fe6 100644
--- a/error.c
+++ b/error.c
@@ -142,7 +142,9 @@ rb_syntax_error_append(VALUE exc, VALUE file, int line, int column,
return exc;
}
-static unsigned int warning_disabled_categories;
+static unsigned int warning_disabled_categories = (
+ 1U << RB_WARN_CATEGORY_DEPRECATED |
+ 0);
static unsigned int
rb_warning_category_mask(VALUE category)