* ext/pathname/pathname.c (path_owned_p): Pathname#owned?

translated from pathname.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2010-09-05 14:03:06 +00:00
Родитель 0fd37b09ee
Коммит 5e620bdd65
3 изменённых файлов: 15 добавлений и 3 удалений

Просмотреть файл

@ -1,3 +1,8 @@
Sun Sep 5 23:02:34 2010 Tanaka Akira <akr@fsij.org>
* ext/pathname/pathname.c (path_owned_p): Pathname#owned?
translated from pathname.rb.
Sat Sep 4 23:48:47 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* file.c (rb_file_s_readlink): symlink target should be in

Просмотреть файл

@ -486,9 +486,6 @@ end
class Pathname # * FileTest *
# See <tt>FileTest.owned?</tt>.
def owned?() FileTest.owned?(@path) end
# See <tt>FileTest.readable?</tt>.
def readable?() FileTest.readable?(@path) end

Просмотреть файл

@ -687,6 +687,15 @@ path_socket_p(VALUE self)
return rb_funcall(rb_mFileTest, rb_intern("socket?"), 1, get_strpath(self));
}
/*
* See <tt>FileTest.owned?</tt>.
*/
static VALUE
path_owned_p(VALUE self)
{
return rb_funcall(rb_mFileTest, rb_intern("owned?"), 1, get_strpath(self));
}
/*
* == Pathname
*
@ -926,4 +935,5 @@ Init_pathname()
rb_define_method(rb_cPathname, "file?", path_file_p, 0);
rb_define_method(rb_cPathname, "pipe?", path_pipe_p, 0);
rb_define_method(rb_cPathname, "socket?", path_socket_p, 0);
rb_define_method(rb_cPathname, "owned?", path_owned_p, 0);
}