зеркало из https://github.com/github/ruby.git
* ext/pathname/pathname.c (path_chardev_p): Pathname#chardev?
translated from pathname.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
a2bf9203e8
Коммит
2d0cbb3c3a
|
@ -1,3 +1,8 @@
|
|||
Sat Aug 28 08:11:05 2010 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* ext/pathname/pathname.c (path_chardev_p): Pathname#chardev?
|
||||
translated from pathname.rb.
|
||||
|
||||
Sat Aug 28 17:39:33 2010 Kenta Murata <mrkn@mrkn.jp>
|
||||
|
||||
* ext/bigdecimal/bigdecimal.c (BigDecimal_save_exception_mode,
|
||||
|
|
|
@ -486,9 +486,6 @@ end
|
|||
|
||||
class Pathname # * FileTest *
|
||||
|
||||
# See <tt>FileTest.chardev?</tt>.
|
||||
def chardev?() FileTest.chardev?(@path) end
|
||||
|
||||
# See <tt>FileTest.executable?</tt>.
|
||||
def executable?() FileTest.executable?(@path) end
|
||||
|
||||
|
|
|
@ -606,6 +606,15 @@ path_blockdev_p(VALUE self)
|
|||
return rb_funcall(rb_mFileTest, rb_intern("blockdev?"), 1, get_strpath(self));
|
||||
}
|
||||
|
||||
/*
|
||||
* See <tt>FileTest.chardev?</tt>.
|
||||
*/
|
||||
static VALUE
|
||||
path_chardev_p(VALUE self)
|
||||
{
|
||||
return rb_funcall(rb_mFileTest, rb_intern("chardev?"), 1, get_strpath(self));
|
||||
}
|
||||
|
||||
/*
|
||||
* == Pathname
|
||||
*
|
||||
|
@ -836,4 +845,5 @@ Init_pathname()
|
|||
rb_define_method(rb_cPathname, "expand_path", path_expand_path, -1);
|
||||
rb_define_method(rb_cPathname, "split", path_split, 0);
|
||||
rb_define_method(rb_cPathname, "blockdev?", path_blockdev_p, 0);
|
||||
rb_define_method(rb_cPathname, "chardev?", path_chardev_p, 0);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче