summaryrefslogtreecommitdiff
path: root/ext/pathname/pathname.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pathname/pathname.c')
-rw-r--r--ext/pathname/pathname.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/ext/pathname/pathname.c b/ext/pathname/pathname.c
index a66fefa53d..2d3a173f5b 100644
--- a/ext/pathname/pathname.c
+++ b/ext/pathname/pathname.c
@@ -57,7 +57,15 @@ static VALUE
path_taint(VALUE self)
{
rb_call_super(0, 0);
- OBJ_TAINT(get_strpath(self));
+ rb_obj_taint(get_strpath(self));
+ return self;
+}
+
+static VALUE
+path_untaint(VALUE self)
+{
+ rb_call_super(0, 0);
+ rb_obj_untaint(get_strpath(self));
return self;
}
@@ -71,4 +79,5 @@ Init_pathname()
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);
}