зеркало из https://github.com/github/ruby.git
* ext/pathname/pathname.c (path_pipe_p): Pathname#pipe?
translated from pathname.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
185e9705ab
Коммит
163b4dee96
|
@ -1,3 +1,8 @@
|
|||
Fri Sep 3 06:16:07 2010 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* ext/pathname/pathname.c (path_pipe_p): Pathname#pipe?
|
||||
translated from pathname.rb.
|
||||
|
||||
Fri Sep 3 06:14:40 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* ext/pty/pty.c (chfunc): restore errno from SystemCallError and
|
||||
|
|
|
@ -486,9 +486,6 @@ end
|
|||
|
||||
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
|
||||
|
||||
|
|
|
@ -669,6 +669,15 @@ path_file_p(VALUE self)
|
|||
return rb_funcall(rb_mFileTest, rb_intern("file?"), 1, get_strpath(self));
|
||||
}
|
||||
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
|
@ -906,4 +915,5 @@ Init_pathname()
|
|||
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);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче