Make taint warnings non-verbose instead of verbose

This commit is contained in:
Jeremy Evans 2020-01-22 09:18:08 -08:00
parent 28d31ead34
commit e18b817b1f
Notes: git 2020-01-23 04:19:44 +09:00
5 changed files with 14 additions and 14 deletions

View File

@ -3035,14 +3035,14 @@ rb_check_frozen(VALUE obj)
void void
rb_error_untrusted(VALUE obj) 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 #undef rb_check_trusted
void void
rb_check_trusted(VALUE obj) 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 void

View File

@ -138,7 +138,7 @@ path_freeze(VALUE self)
static VALUE static VALUE
path_taint(VALUE self) 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; return self;
} }
@ -151,7 +151,7 @@ path_taint(VALUE self)
static VALUE static VALUE
path_untaint(VALUE self) 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; return self;
} }

2
hash.c
View File

@ -4968,7 +4968,7 @@ env_fetch(int argc, VALUE *argv, VALUE _)
int int
rb_env_path_tainted(void) 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; return 0;
} }

View File

@ -1216,7 +1216,7 @@ rb_obj_dummy1(VALUE _x, VALUE _y)
VALUE VALUE
rb_obj_tainted(VALUE obj) 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; return Qfalse;
} }
@ -1230,7 +1230,7 @@ rb_obj_tainted(VALUE obj)
VALUE VALUE
rb_obj_taint(VALUE obj) 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; return obj;
} }
@ -1245,7 +1245,7 @@ rb_obj_taint(VALUE obj)
VALUE VALUE
rb_obj_untaint(VALUE obj) 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; return obj;
} }
@ -1259,7 +1259,7 @@ rb_obj_untaint(VALUE obj)
VALUE VALUE
rb_obj_untrusted(VALUE obj) 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; return Qfalse;
} }
@ -1273,7 +1273,7 @@ rb_obj_untrusted(VALUE obj)
VALUE VALUE
rb_obj_untrust(VALUE obj) 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; return obj;
} }
@ -1288,7 +1288,7 @@ rb_obj_untrust(VALUE obj)
VALUE VALUE
rb_obj_trust(VALUE obj) 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; return obj;
} }
@ -1299,7 +1299,7 @@ rb_obj_trust(VALUE obj)
void void
rb_obj_infect(VALUE victim, VALUE carrier) 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.");
} }
/** /**

View File

@ -910,14 +910,14 @@ rb_enc_str_new_static(const char *ptr, long len, rb_encoding *enc)
VALUE VALUE
rb_tainted_str_new(const char *ptr, long len) 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); return rb_str_new(ptr, len);
} }
VALUE VALUE
rb_tainted_str_new_cstr(const char *ptr) 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); return rb_str_new_cstr(ptr);
} }