summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-01-23 21:42:05 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-01-23 21:42:15 +0900
commitaefb13eb631cc5cd784fe2fc10f1f333a2c5e68c (patch)
treefd1d57d7945a28b8dc0dca5175b9c87a449c56be /string.c
parent0ea759eac9234afc47e8fb1bcacfe9ee12c8ffb6 (diff)
Added rb_warn_deprecated_to_remove
Warn the deprecation and future removal, with obeying the warning flag.
Diffstat (limited to 'string.c')
-rw-r--r--string.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/string.c b/string.c
index b4b365ad4b..cdd987da19 100644
--- a/string.c
+++ b/string.c
@@ -910,14 +910,14 @@ rb_enc_str_new_static(const char *ptr, long len, rb_encoding *enc)
VALUE
rb_tainted_str_new(const char *ptr, long len)
{
- rb_warn("rb_tainted_str_new is deprecated and will be removed in Ruby 3.2.");
+ rb_warn_deprecated_to_remove("rb_tainted_str_new", "3.2");
return rb_str_new(ptr, len);
}
VALUE
rb_tainted_str_new_cstr(const char *ptr)
{
- rb_warn("rb_tainted_str_new_cstr is deprecated and will be removed in Ruby 3.2.");
+ rb_warn_deprecated_to_remove("rb_tainted_str_new_cstr", "3.2");
return rb_str_new_cstr(ptr);
}