aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-09-01 13:04:10 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-09-01 13:04:10 +0000
commitb1729db2924cd4a04c9ac2ff22621f22e8b21562 (patch)
treeb74ff3908c404a68d30c906615d7fe0e7deb227a
parentee9e8f82d4baccd90e82d8a0acd75001aa495b0f (diff)
downloadruby-b1729db2924cd4a04c9ac2ff22621f22e8b21562.tar.gz
* ext/pathname/pathname.c (path_grpowned_p): Pathname#grpowned?
translated from pathname.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--ext/pathname/lib/pathname.rb3
-rw-r--r--ext/pathname/pathname.c10
3 files changed, 15 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index e14aeebc64..e1ad4bca07 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Sep 1 22:03:41 2010 Tanaka Akira <akr@fsij.org>
+
+ * ext/pathname/pathname.c (path_grpowned_p): Pathname#grpowned?
+ translated from pathname.rb.
+
Wed Sep 1 17:39:02 2010 Ryan Davis <ryand-ruby@zenspider.com>
* lib/minitest/*.rb: Imported minitest 1.7.1 r5835.
diff --git a/ext/pathname/lib/pathname.rb b/ext/pathname/lib/pathname.rb
index 3257ef0271..dceb327492 100644
--- a/ext/pathname/lib/pathname.rb
+++ b/ext/pathname/lib/pathname.rb
@@ -486,9 +486,6 @@ end
class Pathname # * FileTest *
- # See <tt>FileTest.grpowned?</tt>.
- def grpowned?() FileTest.grpowned?(@path) end
-
# See <tt>FileTest.directory?</tt>.
def directory?() FileTest.directory?(@path) end
diff --git a/ext/pathname/pathname.c b/ext/pathname/pathname.c
index c635201053..96b7970d8e 100644
--- a/ext/pathname/pathname.c
+++ b/ext/pathname/pathname.c
@@ -643,6 +643,15 @@ path_exist_p(VALUE self)
}
/*
+ * See <tt>FileTest.grpowned?</tt>.
+ */
+static VALUE
+path_grpowned_p(VALUE self)
+{
+ return rb_funcall(rb_mFileTest, rb_intern("grpowned?"), 1, get_strpath(self));
+}
+
+/*
* == Pathname
*
* Pathname represents a pathname which locates a file in a filesystem.
@@ -876,4 +885,5 @@ Init_pathname()
rb_define_method(rb_cPathname, "executable?", path_executable_p, 0);
rb_define_method(rb_cPathname, "executable_real?", path_executable_real_p, 0);
rb_define_method(rb_cPathname, "exist?", path_exist_p, 0);
+ rb_define_method(rb_cPathname, "grpowned?", path_grpowned_p, 0);
}