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:
parent
c4c4bff456
commit
9352485e47
3 changed files with 15 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue