From 5e620bdd65c703c8527d7165f41155b89a8b36a4 Mon Sep 17 00:00:00 2001 From: akr Date: Sun, 5 Sep 2010 14:03:06 +0000 Subject: * 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 --- ext/pathname/pathname.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'ext/pathname/pathname.c') diff --git a/ext/pathname/pathname.c b/ext/pathname/pathname.c index 98b0515402..b15b897366 100644 --- a/ext/pathname/pathname.c +++ b/ext/pathname/pathname.c @@ -687,6 +687,15 @@ path_socket_p(VALUE self) return rb_funcall(rb_mFileTest, rb_intern("socket?"), 1, get_strpath(self)); } +/* + * See FileTest.owned?. + */ +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); } -- cgit v1.2.3