aboutsummaryrefslogtreecommitdiffstats
path: root/process.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-09-14 15:19:15 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-09-14 15:26:25 +0900
commit998ae7c3f36b65f04471cd680b4c7ac78b3d9f30 (patch)
tree57a8cac51c9dd5e99b3305c0f1dd8dcb4ff57401 /process.c
parentb6de0a6c69a4857ca4347f65d7c9a5cb6e52c5bd (diff)
downloadruby-998ae7c3f36b65f04471cd680b4c7ac78b3d9f30.tar.gz
[Bug #19868] Deprecate `Process::Status#&` and `Process::Status#>>`
Diffstat (limited to 'process.c')
-rw-r--r--process.c12
1 files changed, 8 insertions, 4 deletions
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?");