diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-08-07 09:21:37 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-08-07 09:21:37 +0000 |
commit | 49cb5a78a14584de5932637d16fbd4ee0733d9d3 (patch) | |
tree | fb28a03e49179a0f1f18ae0e2253b709378919f0 /ext/pathname/pathname.c | |
parent | f6404fa6d58927e28fb24f3f66b5e3b3c5c1b0c9 (diff) | |
download | ruby-49cb5a78a14584de5932637d16fbd4ee0733d9d3.tar.gz |
* ext/pathname/pathname.c (path_lchown): Pathname#lchown translated
from pathname.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/pathname/pathname.c')
-rw-r--r-- | ext/pathname/pathname.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ext/pathname/pathname.c b/ext/pathname/pathname.c index 5dc846a2ed..e317e85618 100644 --- a/ext/pathname/pathname.c +++ b/ext/pathname/pathname.c @@ -287,6 +287,15 @@ path_chown(VALUE self, VALUE owner, VALUE group) } /* + * See <tt>File.lchown</tt>. + */ +static VALUE +path_lchown(VALUE self, VALUE owner, VALUE group) +{ + return rb_funcall(rb_cFile, rb_intern("lchown"), 3, owner, group, get_strpath(self)); +} + +/* * == Pathname * * Pathname represents a pathname which locates a file in a filesystem. @@ -492,4 +501,5 @@ Init_pathname() rb_define_method(rb_cPathname, "chmod", path_chmod, 1); rb_define_method(rb_cPathname, "lchmod", path_lchmod, 1); rb_define_method(rb_cPathname, "chown", path_chown, 2); + rb_define_method(rb_cPathname, "lchown", path_lchown, 2); } |