ruby-changes:17161
From: akr <ko1@a...>
Date: Wed, 1 Sep 2010 22:04:18 +0900 (JST)
Subject: [ruby-changes:17161] Ruby:r29160 (trunk): * ext/pathname/pathname.c (path_grpowned_p): Pathname#grpowned?
akr 2010-09-01 22:04:10 +0900 (Wed, 01 Sep 2010) New Revision: 29160 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=29160 Log: * ext/pathname/pathname.c (path_grpowned_p): Pathname#grpowned? translated from pathname.rb. Modified files: trunk/ChangeLog trunk/ext/pathname/lib/pathname.rb trunk/ext/pathname/pathname.c Index: ChangeLog =================================================================== --- ChangeLog (revision 29159) +++ ChangeLog (revision 29160) @@ -1,3 +1,8 @@ +Wed Sep 1 22:03:41 2010 Tanaka Akira <akr@f...> + + * ext/pathname/pathname.c (path_grpowned_p): Pathname#grpowned? + translated from pathname.rb. + Wed Sep 1 17:39:02 2010 Ryan Davis <ryand-ruby@z...> * lib/minitest/*.rb: Imported minitest 1.7.1 r5835. Index: ext/pathname/lib/pathname.rb =================================================================== --- ext/pathname/lib/pathname.rb (revision 29159) +++ ext/pathname/lib/pathname.rb (revision 29160) @@ -486,9 +486,6 @@ 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 Index: ext/pathname/pathname.c =================================================================== --- ext/pathname/pathname.c (revision 29159) +++ ext/pathname/pathname.c (revision 29160) @@ -643,6 +643,15 @@ } /* + * 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 @@ 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); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/