mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/pathname/pathname.c (path_exist_p): Pathname#exist? translated
from pathname.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b0993426bb
commit
3121057559
4 changed files with 16 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Tue Aug 31 21:10:23 2010 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
|
* ext/pathname/pathname.c (path_exist_p): Pathname#exist? translated
|
||||||
|
from pathname.rb.
|
||||||
|
|
||||||
Tue Aug 31 17:32:34 2010 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
Tue Aug 31 17:32:34 2010 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||||
|
|
||||||
* ext/tk/stubs.c: fix [Bug #3771] "VC++ can't make ext/tk with enabling
|
* ext/tk/stubs.c: fix [Bug #3771] "VC++ can't make ext/tk with enabling
|
||||||
|
|
|
@ -524,7 +524,7 @@ Sun Aug 8 07:18:22 2010 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
Sun Aug 8 00:41:42 2010 Tanaka Akira <akr@fsij.org>
|
Sun Aug 8 00:41:42 2010 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* include/ruby/subst.h: new file for substitute standard functions..
|
* include/ruby/subst.h: new file for substitute standard functions.
|
||||||
|
|
||||||
* include/ruby/missing.h: don't substitute "close", etc. here.
|
* include/ruby/missing.h: don't substitute "close", etc. here.
|
||||||
|
|
||||||
|
|
|
@ -486,9 +486,6 @@ end
|
||||||
|
|
||||||
class Pathname # * FileTest *
|
class Pathname # * FileTest *
|
||||||
|
|
||||||
# See <tt>FileTest.exist?</tt>.
|
|
||||||
def exist?() FileTest.exist?(@path) end
|
|
||||||
|
|
||||||
# See <tt>FileTest.grpowned?</tt>.
|
# See <tt>FileTest.grpowned?</tt>.
|
||||||
def grpowned?() FileTest.grpowned?(@path) end
|
def grpowned?() FileTest.grpowned?(@path) end
|
||||||
|
|
||||||
|
|
|
@ -633,6 +633,15 @@ path_executable_real_p(VALUE self)
|
||||||
return rb_funcall(rb_mFileTest, rb_intern("executable_real?"), 1, get_strpath(self));
|
return rb_funcall(rb_mFileTest, rb_intern("executable_real?"), 1, get_strpath(self));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* See <tt>FileTest.exist?</tt>.
|
||||||
|
*/
|
||||||
|
static VALUE
|
||||||
|
path_exist_p(VALUE self)
|
||||||
|
{
|
||||||
|
return rb_funcall(rb_mFileTest, rb_intern("exist?"), 1, get_strpath(self));
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* == Pathname
|
* == Pathname
|
||||||
*
|
*
|
||||||
|
@ -866,4 +875,5 @@ Init_pathname()
|
||||||
rb_define_method(rb_cPathname, "chardev?", path_chardev_p, 0);
|
rb_define_method(rb_cPathname, "chardev?", path_chardev_p, 0);
|
||||||
rb_define_method(rb_cPathname, "executable?", path_executable_p, 0);
|
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, "executable_real?", path_executable_real_p, 0);
|
||||||
|
rb_define_method(rb_cPathname, "exist?", path_exist_p, 0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue