mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/pathname/pathname.c (path_chown): Pathname#chown translated
from pathname.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a1d1c102d7
commit
261bb184c6
3 changed files with 15 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Sat Aug 7 08:26:26 2010 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
|
* ext/pathname/pathname.c (path_chown): Pathname#chown translated
|
||||||
|
from pathname.rb.
|
||||||
|
|
||||||
Sat Aug 7 02:09:04 2010 Tanaka Akira <akr@fsij.org>
|
Sat Aug 7 02:09:04 2010 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* ext/pathname/pathname.c (path_lchmod): Pathname#lchmod translated
|
* ext/pathname/pathname.c (path_lchmod): Pathname#lchmod translated
|
||||||
|
|
|
@ -512,9 +512,6 @@ end
|
||||||
|
|
||||||
class Pathname # * File *
|
class Pathname # * File *
|
||||||
|
|
||||||
# See <tt>File.chown</tt>. Change owner and group of file.
|
|
||||||
def chown(owner, group) File.chown(owner, group, @path) end
|
|
||||||
|
|
||||||
# See <tt>File.lchown</tt>.
|
# See <tt>File.lchown</tt>.
|
||||||
def lchown(owner, group) File.lchown(owner, group, @path) end
|
def lchown(owner, group) File.lchown(owner, group, @path) end
|
||||||
|
|
||||||
|
|
|
@ -277,6 +277,15 @@ path_lchmod(VALUE self, VALUE mode)
|
||||||
return rb_funcall(rb_cFile, rb_intern("lchmod"), 2, mode, get_strpath(self));
|
return rb_funcall(rb_cFile, rb_intern("lchmod"), 2, mode, get_strpath(self));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* See <tt>File.chown</tt>. Change owner and group of file.
|
||||||
|
*/
|
||||||
|
static VALUE
|
||||||
|
path_chown(VALUE self, VALUE owner, VALUE group)
|
||||||
|
{
|
||||||
|
return rb_funcall(rb_cFile, rb_intern("chown"), 3, owner, group, get_strpath(self));
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* == Pathname
|
* == Pathname
|
||||||
*
|
*
|
||||||
|
@ -482,4 +491,5 @@ Init_pathname()
|
||||||
rb_define_method(rb_cPathname, "mtime", path_mtime, 0);
|
rb_define_method(rb_cPathname, "mtime", path_mtime, 0);
|
||||||
rb_define_method(rb_cPathname, "chmod", path_chmod, 1);
|
rb_define_method(rb_cPathname, "chmod", path_chmod, 1);
|
||||||
rb_define_method(rb_cPathname, "lchmod", path_lchmod, 1);
|
rb_define_method(rb_cPathname, "lchmod", path_lchmod, 1);
|
||||||
|
rb_define_method(rb_cPathname, "chown", path_chown, 1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue