ruby-changes:16764
From: akr <ko1@a...>
Date: Mon, 26 Jul 2010 22:47:09 +0900 (JST)
Subject: [ruby-changes:16764] Ruby:r28760 (trunk): * ext/pathname/pathname.c (path_taint): Pathname#taint translated from
akr 2010-07-26 22:35:18 +0900 (Mon, 26 Jul 2010) New Revision: 28760 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=28760 Log: * ext/pathname/pathname.c (path_taint): Pathname#taint translated from pathname.rb. Modified files: trunk/ChangeLog trunk/ext/pathname/lib/pathname.rb trunk/ext/pathname/pathname.c Index: ChangeLog =================================================================== --- ChangeLog (revision 28759) +++ ChangeLog (revision 28760) @@ -1,3 +1,8 @@ +Mon Jul 26 22:34:37 2010 Tanaka Akira <akr@f...> + + * ext/pathname/pathname.c (path_taint): Pathname#taint translated from + pathname.rb. + Mon Jul 26 18:18:09 2010 Nobuyoshi Nakada <nobu@r...> * configure.in (config.h): add include guard. Index: ext/pathname/lib/pathname.rb =================================================================== --- ext/pathname/lib/pathname.rb (revision 28759) +++ ext/pathname/lib/pathname.rb (revision 28760) @@ -208,7 +208,6 @@ # :startdoc: - def taint() super; @path.taint; self end def untaint() super; @path.untaint; self end # Index: ext/pathname/pathname.c =================================================================== --- ext/pathname/pathname.c (revision 28759) +++ ext/pathname/pathname.c (revision 28760) @@ -53,6 +53,14 @@ 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 @@ 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); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/