Skip to content

Commit

Permalink
[ruby/pathname] Remove taint/untaint methods because they should be r…
Browse files Browse the repository at this point in the history
…emoved since Ruby 3.2 released.

  Fixes ruby/pathname#28

ruby/pathname@c52fd3a835
  • Loading branch information
hsbt authored and matzbot committed Mar 27, 2023
1 parent cc8a48a commit 9b7a7e9
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions ext/pathname/pathname.c
Expand Up @@ -130,32 +130,6 @@ path_freeze(VALUE self)
return self;
}

/*
* call-seq:
* pathname.taint -> obj
*
* Returns pathname. This method is deprecated and will be removed in Ruby 3.2.
*/
static VALUE
path_taint(VALUE self)
{
rb_warn("Pathname#taint is deprecated and will be removed in Ruby 3.2.");
return self;
}

/*
* call-seq:
* pathname.untaint -> obj
*
* Returns pathname. This method is deprecated and will be removed in Ruby 3.2.
*/
static VALUE
path_untaint(VALUE self)
{
rb_warn("Pathname#untaint is deprecated and will be removed in Ruby 3.2.");
return self;
}

/*
* Compare this pathname with +other+. The comparison is string-based.
* Be aware that two different paths (<tt>foo.txt</tt> and <tt>./foo.txt</tt>)
Expand Down Expand Up @@ -1537,8 +1511,6 @@ Init_pathname(void)
rb_cPathname = rb_define_class("Pathname", rb_cObject);
rb_define_method(rb_cPathname, "initialize", path_initialize, 1);
rb_define_method(rb_cPathname, "freeze", path_freeze, 0);
rb_define_method(rb_cPathname, "taint", path_taint, 0);
rb_define_method(rb_cPathname, "untaint", path_untaint, 0);
rb_define_method(rb_cPathname, "==", path_eq, 1);
rb_define_method(rb_cPathname, "===", path_eq, 1);
rb_define_method(rb_cPathname, "eql?", path_eq, 1);
Expand Down

0 comments on commit 9b7a7e9

Please sign in to comment.