mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
195a7da4ec
commit
aa4f1d8e81
3 changed files with 14 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Mon Jul 26 22:34:37 2010 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* ext/pathname/pathname.c (path_taint): Pathname#taint translated from
|
||||
pathname.rb.
|
||||
|
||||
Mon Jul 26 18:18:09 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* configure.in (config.h): add include guard.
|
||||
|
|
|
@ -208,7 +208,6 @@ class Pathname
|
|||
|
||||
# :startdoc:
|
||||
|
||||
def taint() super; @path.taint; self end
|
||||
def untaint() super; @path.untaint; self end
|
||||
|
||||
#
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue