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

ruby-changes:59777

From: Jeremy <ko1@a...>
Date: Thu, 23 Jan 2020 04:19:42 +0900 (JST)
Subject: [ruby-changes:59777] e18b817b1f (master): Make taint warnings non-verbose instead of verbose

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

From e18b817b1f0a4c318f1f0fe54fceaa5cbc85e8ab Mon Sep 17 00:00:00 2001
From: Jeremy Evans <code@j...>
Date: Wed, 22 Jan 2020 09:18:08 -0800
Subject: Make taint warnings non-verbose instead of verbose


diff --git a/error.c b/error.c
index 1690658..1702a70 100644
--- a/error.c
+++ b/error.c
@@ -3035,14 +3035,14 @@ rb_check_frozen(VALUE obj) https://github.com/ruby/ruby/blob/trunk/error.c#L3035
 void
 rb_error_untrusted(VALUE obj)
 {
-    rb_warning("rb_error_untrusted is deprecated and will be removed in Ruby 3.2.");
+    rb_warn("rb_error_untrusted is deprecated and will be removed in Ruby 3.2.");
 }
 
 #undef rb_check_trusted
 void
 rb_check_trusted(VALUE obj)
 {
-    rb_warning("rb_check_trusted is deprecated and will be removed in Ruby 3.2.");
+    rb_warn("rb_check_trusted is deprecated and will be removed in Ruby 3.2.");
 }
 
 void
diff --git a/ext/pathname/pathname.c b/ext/pathname/pathname.c
index 15f80d4..e511560 100644
--- a/ext/pathname/pathname.c
+++ b/ext/pathname/pathname.c
@@ -138,7 +138,7 @@ path_freeze(VALUE self) https://github.com/ruby/ruby/blob/trunk/ext/pathname/pathname.c#L138
 static VALUE
 path_taint(VALUE self)
 {
-    rb_warning("Pathname#taint is deprecated and will be removed in Ruby 3.2.");
+    rb_warn("Pathname#taint is deprecated and will be removed in Ruby 3.2.");
     return self;
 }
 
@@ -151,7 +151,7 @@ path_taint(VALUE self) https://github.com/ruby/ruby/blob/trunk/ext/pathname/pathname.c#L151
 static VALUE
 path_untaint(VALUE self)
 {
-    rb_warning("Pathname#untaint is deprecated and will be removed in Ruby 3.2.");
+    rb_warn("Pathname#untaint is deprecated and will be removed in Ruby 3.2.");
     return self;
 }
 
diff --git a/hash.c b/hash.c
index a1b57ce..6823bae 100644
--- a/hash.c
+++ b/hash.c
@@ -4968,7 +4968,7 @@ env_fetch(int argc, VALUE *argv, VALUE _) https://github.com/ruby/ruby/blob/trunk/hash.c#L4968
 int
 rb_env_path_tainted(void)
 {
-    rb_warning("rb_env_path_tainted is deprecated and will be removed in Ruby 3.2.");
+    rb_warn("rb_env_path_tainted is deprecated and will be removed in Ruby 3.2.");
     return 0;
 }
 
diff --git a/object.c b/object.c
index 0080c35..bfce958 100644
--- a/object.c
+++ b/object.c
@@ -1216,7 +1216,7 @@ rb_obj_dummy1(VALUE _x, VALUE _y) https://github.com/ruby/ruby/blob/trunk/object.c#L1216
 VALUE
 rb_obj_tainted(VALUE obj)
 {
-    rb_warning("Object#tainted? is deprecated and will be removed in Ruby 3.2.");
+    rb_warn("Object#tainted? is deprecated and will be removed in Ruby 3.2.");
     return Qfalse;
 }
 
@@ -1230,7 +1230,7 @@ rb_obj_tainted(VALUE obj) https://github.com/ruby/ruby/blob/trunk/object.c#L1230
 VALUE
 rb_obj_taint(VALUE obj)
 {
-    rb_warning("Object#taint is deprecated and will be removed in Ruby 3.2.");
+    rb_warn("Object#taint is deprecated and will be removed in Ruby 3.2.");
     return obj;
 }
 
@@ -1245,7 +1245,7 @@ rb_obj_taint(VALUE obj) https://github.com/ruby/ruby/blob/trunk/object.c#L1245
 VALUE
 rb_obj_untaint(VALUE obj)
 {
-    rb_warning("Object#untaint is deprecated and will be removed in Ruby 3.2.");
+    rb_warn("Object#untaint is deprecated and will be removed in Ruby 3.2.");
     return obj;
 }
 
@@ -1259,7 +1259,7 @@ rb_obj_untaint(VALUE obj) https://github.com/ruby/ruby/blob/trunk/object.c#L1259
 VALUE
 rb_obj_untrusted(VALUE obj)
 {
-    rb_warning("Object#untrusted? is deprecated and will be removed in Ruby 3.2.");
+    rb_warn("Object#untrusted? is deprecated and will be removed in Ruby 3.2.");
     return Qfalse;
 }
 
@@ -1273,7 +1273,7 @@ rb_obj_untrusted(VALUE obj) https://github.com/ruby/ruby/blob/trunk/object.c#L1273
 VALUE
 rb_obj_untrust(VALUE obj)
 {
-    rb_warning("Object#untrust is deprecated and will be removed in Ruby 3.2.");
+    rb_warn("Object#untrust is deprecated and will be removed in Ruby 3.2.");
     return obj;
 }
 
@@ -1288,7 +1288,7 @@ rb_obj_untrust(VALUE obj) https://github.com/ruby/ruby/blob/trunk/object.c#L1288
 VALUE
 rb_obj_trust(VALUE obj)
 {
-    rb_warning("Object#trust is deprecated and will be removed in Ruby 3.2.");
+    rb_warn("Object#trust is deprecated and will be removed in Ruby 3.2.");
     return obj;
 }
 
@@ -1299,7 +1299,7 @@ rb_obj_trust(VALUE obj) https://github.com/ruby/ruby/blob/trunk/object.c#L1299
 void
 rb_obj_infect(VALUE victim, VALUE carrier)
 {
-    rb_warning("rb_obj_infect is deprecated and will be removed in Ruby 3.2.");
+    rb_warn("rb_obj_infect is deprecated and will be removed in Ruby 3.2.");
 }
 
 /**
diff --git a/string.c b/string.c
index ca425e9..b4b365a 100644
--- a/string.c
+++ b/string.c
@@ -910,14 +910,14 @@ rb_enc_str_new_static(const char *ptr, long len, rb_encoding *enc) https://github.com/ruby/ruby/blob/trunk/string.c#L910
 VALUE
 rb_tainted_str_new(const char *ptr, long len)
 {
-    rb_warning("rb_tainted_str_new is deprecated and will be removed in Ruby 3.2.");
+    rb_warn("rb_tainted_str_new is deprecated and will be removed in Ruby 3.2.");
     return rb_str_new(ptr, len);
 }
 
 VALUE
 rb_tainted_str_new_cstr(const char *ptr)
 {
-    rb_warning("rb_tainted_str_new_cstr is deprecated and will be removed in Ruby 3.2.");
+    rb_warn("rb_tainted_str_new_cstr is deprecated and will be removed in Ruby 3.2.");
     return rb_str_new_cstr(ptr);
 }
 
-- 
cgit v0.10.2


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

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