[前][次][番号順一覧][スレッド一覧]

ruby-changes:66635

From: Nobuyoshi <ko1@a...>
Date: Wed, 30 Jun 2021 10:47:26 +0900 (JST)
Subject: [ruby-changes:66635] 94bd3bde81 (master): Specify version to remove as bare numbers

https://git.ruby-lang.org/ruby.git/commit/?id=94bd3bde81

From 94bd3bde8181b9abbd0b55f1382268dc78be2c37 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Thu, 7 Jan 2021 16:40:49 +0900
Subject: Specify version to remove as bare numbers

---
 error.c          |  4 ++--
 hash.c           |  2 +-
 internal/error.h |  6 +++---
 object.c         | 14 +++++++-------
 string.c         |  4 ++--
 5 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/error.c b/error.c
index 6e08e64..97f8c22 100644
--- a/error.c
+++ b/error.c
@@ -3313,14 +3313,14 @@ rb_check_frozen(VALUE obj) https://github.com/ruby/ruby/blob/trunk/error.c#L3313
 void
 rb_error_untrusted(VALUE obj)
 {
-    rb_warn_deprecated_to_remove_at("3.2", "rb_error_untrusted", NULL);
+    rb_warn_deprecated_to_remove_at(3.2, "rb_error_untrusted", NULL);
 }
 
 #undef rb_check_trusted
 void
 rb_check_trusted(VALUE obj)
 {
-    rb_warn_deprecated_to_remove_at("3.2", "rb_check_trusted", NULL);
+    rb_warn_deprecated_to_remove_at(3.2, "rb_check_trusted", NULL);
 }
 
 void
diff --git a/hash.c b/hash.c
index e4c7423..33b553d 100644
--- a/hash.c
+++ b/hash.c
@@ -5043,7 +5043,7 @@ env_fetch(int argc, VALUE *argv, VALUE _) https://github.com/ruby/ruby/blob/trunk/hash.c#L5043
 int
 rb_env_path_tainted(void)
 {
-    rb_warn_deprecated_to_remove_at("3.2", "rb_env_path_tainted", NULL);
+    rb_warn_deprecated_to_remove_at(3.2, "rb_env_path_tainted", NULL);
     return 0;
 }
 
diff --git a/internal/error.h b/internal/error.h
index 6fbe31b..360203a 100644
--- a/internal/error.h
+++ b/internal/error.h
@@ -88,11 +88,11 @@ void rb_deprecated_method_to_be_removed(const char *); https://github.com/ruby/ruby/blob/trunk/internal/error.h#L88
      RBIMPL_ASSERT_NOTHING)
 # endif
 # define rb_warn_deprecated_to_remove_at(removal, ...) \
-    (rb_deprecated_method_to_be_removed(removal), \
-     rb_warn_deprecated_to_remove(removal, __VA_ARGS__))
+    (rb_deprecated_method_to_be_removed(#removal), \
+     rb_warn_deprecated_to_remove(#removal, __VA_ARGS__))
 #else
 # define rb_warn_deprecated_to_remove_at(removal, ...) \
-        rb_warn_deprecated_to_remove(removal, __VA_ARGS__)
+        rb_warn_deprecated_to_remove(#removal, __VA_ARGS__)
 #endif
 VALUE rb_syntax_error_append(VALUE, VALUE, int, int, rb_encoding*, const char*, va_list);
 PRINTF_ARGS(void rb_enc_warn(rb_encoding *enc, const char *fmt, ...), 2, 3);
diff --git a/object.c b/object.c
index 91e348a..365c60f 100644
--- a/object.c
+++ b/object.c
@@ -1205,7 +1205,7 @@ rb_obj_dummy1(VALUE _x, VALUE _y) https://github.com/ruby/ruby/blob/trunk/object.c#L1205
 VALUE
 rb_obj_tainted(VALUE obj)
 {
-    rb_warn_deprecated_to_remove_at("3.2", "Object#tainted?", NULL);
+    rb_warn_deprecated_to_remove_at(3.2, "Object#tainted?", NULL);
     return Qfalse;
 }
 
@@ -1219,7 +1219,7 @@ rb_obj_tainted(VALUE obj) https://github.com/ruby/ruby/blob/trunk/object.c#L1219
 VALUE
 rb_obj_taint(VALUE obj)
 {
-    rb_warn_deprecated_to_remove_at("3.2", "Object#taint", NULL);
+    rb_warn_deprecated_to_remove_at(3.2, "Object#taint", NULL);
     return obj;
 }
 
@@ -1234,7 +1234,7 @@ rb_obj_taint(VALUE obj) https://github.com/ruby/ruby/blob/trunk/object.c#L1234
 VALUE
 rb_obj_untaint(VALUE obj)
 {
-    rb_warn_deprecated_to_remove_at("3.2", "Object#untaint", NULL);
+    rb_warn_deprecated_to_remove_at(3.2, "Object#untaint", NULL);
     return obj;
 }
 
@@ -1248,7 +1248,7 @@ rb_obj_untaint(VALUE obj) https://github.com/ruby/ruby/blob/trunk/object.c#L1248
 VALUE
 rb_obj_untrusted(VALUE obj)
 {
-    rb_warn_deprecated_to_remove_at("3.2", "Object#untrusted?", NULL);
+    rb_warn_deprecated_to_remove_at(3.2, "Object#untrusted?", NULL);
     return Qfalse;
 }
 
@@ -1262,7 +1262,7 @@ rb_obj_untrusted(VALUE obj) https://github.com/ruby/ruby/blob/trunk/object.c#L1262
 VALUE
 rb_obj_untrust(VALUE obj)
 {
-    rb_warn_deprecated_to_remove_at("3.2", "Object#untrust", NULL);
+    rb_warn_deprecated_to_remove_at(3.2, "Object#untrust", NULL);
     return obj;
 }
 
@@ -1277,7 +1277,7 @@ rb_obj_untrust(VALUE obj) https://github.com/ruby/ruby/blob/trunk/object.c#L1277
 VALUE
 rb_obj_trust(VALUE obj)
 {
-    rb_warn_deprecated_to_remove_at("3.2", "Object#trust", NULL);
+    rb_warn_deprecated_to_remove_at(3.2, "Object#trust", NULL);
     return obj;
 }
 
@@ -1288,7 +1288,7 @@ rb_obj_trust(VALUE obj) https://github.com/ruby/ruby/blob/trunk/object.c#L1288
 void
 rb_obj_infect(VALUE victim, VALUE carrier)
 {
-    rb_warn_deprecated_to_remove_at("3.2", "rb_obj_infect", NULL);
+    rb_warn_deprecated_to_remove_at(3.2, "rb_obj_infect", NULL);
 }
 
 /**
diff --git a/string.c b/string.c
index edc3288..827bc89 100644
--- a/string.c
+++ b/string.c
@@ -944,14 +944,14 @@ rb_enc_str_new_static(const char *ptr, long len, rb_encoding *enc) https://github.com/ruby/ruby/blob/trunk/string.c#L944
 VALUE
 rb_tainted_str_new(const char *ptr, long len)
 {
-    rb_warn_deprecated_to_remove_at("3.2", "rb_tainted_str_new", NULL);
+    rb_warn_deprecated_to_remove_at(3.2, "rb_tainted_str_new", NULL);
     return rb_str_new(ptr, len);
 }
 
 VALUE
 rb_tainted_str_new_cstr(const char *ptr)
 {
-    rb_warn_deprecated_to_remove_at("3.2", "rb_tainted_str_new_cstr", NULL);
+    rb_warn_deprecated_to_remove_at(3.2, "rb_tainted_str_new_cstr", NULL);
     return rb_str_new_cstr(ptr);
 }
 
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]