ruby-changes:17192
From: akr <ko1@a...>
Date: Tue, 7 Sep 2010 21:04:32 +0900 (JST)
Subject: [ruby-changes:17192] Ruby:r29192 (trunk): * ext/pathname/pathname.c (path_readable_real_p):
akr 2010-09-07 21:04:17 +0900 (Tue, 07 Sep 2010) New Revision: 29192 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=29192 Log: * ext/pathname/pathname.c (path_readable_real_p): Pathname#readable_real? translated from pathname.rb. Modified files: trunk/ChangeLog trunk/ext/pathname/lib/pathname.rb trunk/ext/pathname/pathname.c Index: ChangeLog =================================================================== --- ChangeLog (revision 29191) +++ ChangeLog (revision 29192) @@ -1,3 +1,8 @@ +Tue Sep 7 21:03:35 2010 Tanaka Akira <akr@f...> + + * ext/pathname/pathname.c (path_readable_real_p): + Pathname#readable_real? translated from pathname.rb. + Mon Sep 6 23:07:25 2010 Tanaka Akira <akr@f...> * ext/pathname/pathname.c (path_world_readable_p): Index: ext/pathname/lib/pathname.rb =================================================================== --- ext/pathname/lib/pathname.rb (revision 29191) +++ ext/pathname/lib/pathname.rb (revision 29192) @@ -486,9 +486,6 @@ class Pathname # * FileTest * - # See <tt>FileTest.readable_real?</tt>. - def readable_real?() FileTest.readable_real?(@path) end - # See <tt>FileTest.setuid?</tt>. def setuid?() FileTest.setuid?(@path) end Index: ext/pathname/pathname.c =================================================================== --- ext/pathname/pathname.c (revision 29191) +++ ext/pathname/pathname.c (revision 29192) @@ -715,6 +715,15 @@ } /* + * See <tt>FileTest.readable_real?</tt>. + */ +static VALUE +path_readable_real_p(VALUE self) +{ + return rb_funcall(rb_mFileTest, rb_intern("readable_real?"), 1, get_strpath(self)); +} + +/* * == Pathname * * Pathname represents a pathname which locates a file in a filesystem. @@ -956,4 +965,5 @@ 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); + rb_define_method(rb_cPathname, "readable_real?", path_readable_real_p, 0); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/