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_lchmod): Pathname#lchmod translated

from pathname.rb.


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

View file

@ -1,3 +1,8 @@
Sat Aug 7 02:09:04 2010 Tanaka Akira <akr@fsij.org>
* ext/pathname/pathname.c (path_lchmod): Pathname#lchmod translated
from pathname.rb.
Fri Aug 6 21:30:06 2010 Tanaka Akira <akr@fsij.org>
* ext/pathname/pathname.c (path_chmod): Pathname#chmod translated from

View file

@ -512,9 +512,6 @@ end
class Pathname # * File *
# See <tt>File.lchmod</tt>.
def lchmod(mode) File.lchmod(mode, @path) end
# See <tt>File.chown</tt>. Change owner and group of file.
def chown(owner, group) File.chown(owner, group, @path) end

View file

@ -268,6 +268,15 @@ path_chmod(VALUE self, VALUE mode)
return rb_funcall(rb_cFile, rb_intern("chmod"), 2, mode, get_strpath(self));
}
/*
* See <tt>File.lchmod</tt>.
*/
static VALUE
path_lchmod(VALUE self, VALUE mode)
{
return rb_funcall(rb_cFile, rb_intern("lchmod"), 2, mode, get_strpath(self));
}
/*
* == Pathname
*
@ -472,4 +481,5 @@ Init_pathname()
rb_define_method(rb_cPathname, "ctime", path_ctime, 0);
rb_define_method(rb_cPathname, "mtime", path_mtime, 0);
rb_define_method(rb_cPathname, "chmod", path_chmod, 1);
rb_define_method(rb_cPathname, "lchmod", path_lchmod, 1);
}