From 122018e8029d5f6052d7448d8da1ec3f005d4afb Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 14 Jun 2009 01:23:21 +0000 Subject: [PATCH] * file.c (rb_file_size): added rdoc. a patch from Run Paint Run Run at [ruby-core:23839]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ file.c | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/ChangeLog b/ChangeLog index e502dec55c..c12026493d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sun Jun 14 10:23:16 2009 Nobuyoshi Nakada + + * file.c (rb_file_size): added rdoc. a patch from Run Paint Run + Run at [ruby-core:23839]. + Sun Jun 14 07:53:26 2009 Tadayoshi Funaba * complex.c (nucomp_fdiv): use fdiv recursively. diff --git a/file.c b/file.c index ba703d5605..089435cfca 100644 --- a/file.c +++ b/file.c @@ -1806,6 +1806,16 @@ rb_file_ctime(VALUE obj) return stat_ctime(&st); } +/* + * call-seq: + * file.size => integer + * + * Returns the size of file in bytes. + * + * File.new("testfile").size #=> 66 + * + */ + static VALUE rb_file_size(VALUE obj) {