* ext/pathname/pathname.c (path_taint): use rb_obj_taint.
(path_untaint): Pathname#untaint translated from pathname.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
53b6ab6a04
commit
0cb17010c4
@ -1,3 +1,9 @@
|
||||
Tue Jul 27 23:09:09 2010 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* ext/pathname/pathname.c (path_taint): use rb_obj_taint.
|
||||
(path_untaint): Pathname#untaint translated from
|
||||
pathname.rb.
|
||||
|
||||
Tue Jul 27 18:59:15 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* lib/mkmf.rb (have_framework): added.
|
||||
|
@ -208,8 +208,6 @@ class Pathname
|
||||
|
||||
# :startdoc:
|
||||
|
||||
def untaint() super; @path.untaint; self end
|
||||
|
||||
#
|
||||
# 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>)
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user