diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-07-26 13:35:18 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-07-26 13:35:18 +0000 |
commit | aa4f1d8e81b21d9f0ee19b5041595effacf77201 (patch) | |
tree | 1592819e3c6847146b67e4827106199d5f6cf508 /ext/pathname/pathname.c | |
parent | 195a7da4ec0b726005b22c8f88f353d7c3f24bfc (diff) | |
download | ruby-aa4f1d8e81b21d9f0ee19b5041595effacf77201.tar.gz |
* ext/pathname/pathname.c (path_taint): Pathname#taint translated from
pathname.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/pathname/pathname.c')
-rw-r--r-- | ext/pathname/pathname.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/pathname/pathname.c b/ext/pathname/pathname.c index cba325b0dc..a66fefa53d 100644 --- a/ext/pathname/pathname.c +++ b/ext/pathname/pathname.c @@ -53,6 +53,14 @@ path_freeze(VALUE self) return self; } +static VALUE +path_taint(VALUE self) +{ + rb_call_super(0, 0); + OBJ_TAINT(get_strpath(self)); + return self; +} + void Init_pathname() { @@ -62,4 +70,5 @@ Init_pathname() 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); } |