ruby-changes:17171
From: akr <ko1@a...>
Date: Fri, 3 Sep 2010 06:23:11 +0900 (JST)
Subject: [ruby-changes:17171] Ruby:r29170 (trunk): * ext/pathname/pathname.c (path_pipe_p): Pathname#pipe?
akr 2010-09-03 06:17:31 +0900 (Fri, 03 Sep 2010) New Revision: 29170 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=29170 Log: * ext/pathname/pathname.c (path_pipe_p): Pathname#pipe? translated from pathname.rb. Modified files: trunk/ChangeLog trunk/ext/pathname/lib/pathname.rb trunk/ext/pathname/pathname.c Index: ChangeLog =================================================================== --- ChangeLog (revision 29169) +++ ChangeLog (revision 29170) @@ -1,3 +1,8 @@ +Fri Sep 3 06:16:07 2010 Tanaka Akira <akr@f...> + + * ext/pathname/pathname.c (path_pipe_p): Pathname#pipe? + translated from pathname.rb. + Fri Sep 3 06:14:40 2010 Nobuyoshi Nakada <nobu@r...> * ext/pty/pty.c (chfunc): restore errno from SystemCallError and Index: ext/pathname/lib/pathname.rb =================================================================== --- ext/pathname/lib/pathname.rb (revision 29169) +++ ext/pathname/lib/pathname.rb (revision 29170) @@ -486,9 +486,6 @@ class Pathname # * FileTest * - # See <tt>FileTest.pipe?</tt>. - def pipe?() FileTest.pipe?(@path) end - # See <tt>FileTest.socket?</tt>. def socket?() FileTest.socket?(@path) end Index: ext/pathname/pathname.c =================================================================== --- ext/pathname/pathname.c (revision 29169) +++ ext/pathname/pathname.c (revision 29170) @@ -670,6 +670,15 @@ } /* + * See <tt>FileTest.pipe?</tt>. + */ +static VALUE +path_pipe_p(VALUE self) +{ + return rb_funcall(rb_mFileTest, rb_intern("pipe?"), 1, get_strpath(self)); +} + +/* * == Pathname * * Pathname represents a pathname which locates a file in a filesystem. @@ -906,4 +915,5 @@ rb_define_method(rb_cPathname, "grpowned?", path_grpowned_p, 0); rb_define_method(rb_cPathname, "directory?", path_directory_p, 0); rb_define_method(rb_cPathname, "file?", path_file_p, 0); + rb_define_method(rb_cPathname, "pipe?", path_pipe_p, 0); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/