From 998ae7c3f36b65f04471cd680b4c7ac78b3d9f30 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 14 Sep 2023 15:19:15 +0900 Subject: [Bug #19868] Deprecate `Process::Status#&` and `Process::Status#>>` --- process.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'process.c') diff --git a/process.c b/process.c index 97db867e82..d7e04830ee 100644 --- a/process.c +++ b/process.c @@ -870,7 +870,7 @@ pst_equal(VALUE st1, VALUE st2) * call-seq: * stat & mask -> integer * - * The use of this method is discouraged; use other attribute methods. + * This method is deprecated; use other attribute methods. * * Returns the logical AND of the value of #to_i with +mask+: * @@ -891,7 +891,9 @@ pst_bitand(VALUE st1, VALUE st2) if (mask < 0) { rb_raise(rb_eArgError, "negative mask value: %d", mask); } -#define WARN_SUGGEST(suggest) rb_warn("Use " suggest " instead of Process::Status#&") +#define WARN_SUGGEST(suggest) \ + rb_warn_deprecated_to_remove_at(3.4, "Process::Status#&", suggest) + switch (mask) { case 0x80: WARN_SUGGEST("Process::Status#coredump?"); @@ -920,7 +922,7 @@ pst_bitand(VALUE st1, VALUE st2) * call-seq: * stat >> places -> integer * - * The use of this method is discouraged; use other predicate methods. + * This method is deprecated; use other predicate methods. * * Returns the value of #to_i, shifted +places+ to the right: * @@ -942,7 +944,9 @@ pst_rshift(VALUE st1, VALUE st2) if (places < 0) { rb_raise(rb_eArgError, "negative shift value: %d", places); } -#define WARN_SUGGEST(suggest) rb_warn("Use " suggest " instead of Process::Status#>>") +#define WARN_SUGGEST(suggest) \ + rb_warn_deprecated_to_remove_at(3.4, "Process::Status#>>", suggest) + switch (places) { case 7: WARN_SUGGEST("Process::Status#coredump?"); -- cgit v1.2.3