1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/pathname/pathname.c (path_world_readable_p):

Pathname#world_readable?  translated from pathname.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2010-09-06 14:08:08 +00:00
parent dad43c29f8
commit 746f85beb4
3 changed files with 15 additions and 3 deletions

View file

@ -1,3 +1,8 @@
Mon Sep 6 23:07:25 2010 Tanaka Akira <akr@fsij.org>
* ext/pathname/pathname.c (path_world_readable_p):
Pathname#world_readable? translated from pathname.rb.
Mon Sep 6 11:03:13 2010 NAKAMURA, Hiroshi <nahi@ruby-lang.org>
* Fixed wrong check of missing functions. Patch by Adrian Quark.

View file

@ -486,9 +486,6 @@ end
class Pathname # * FileTest *
# See <tt>FileTest.world_readable?</tt>.
def world_readable?() FileTest.world_readable?(@path) end
# See <tt>FileTest.readable_real?</tt>.
def readable_real?() FileTest.readable_real?(@path) end

View file

@ -705,6 +705,15 @@ path_readable_p(VALUE self)
return rb_funcall(rb_mFileTest, rb_intern("readable?"), 1, get_strpath(self));
}
/*
* See <tt>FileTest.world_readable?</tt>.
*/
static VALUE
path_world_readable_p(VALUE self)
{
return rb_funcall(rb_mFileTest, rb_intern("world_readable?"), 1, get_strpath(self));
}
/*
* == Pathname
*
@ -946,4 +955,5 @@ Init_pathname()
rb_define_method(rb_cPathname, "socket?", path_socket_p, 0);
rb_define_method(rb_cPathname, "owned?", path_owned_p, 0);
rb_define_method(rb_cPathname, "readable?", path_readable_p, 0);
rb_define_method(rb_cPathname, "world_readable?", path_world_readable_p, 0);
}