diff options
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -6063,11 +6063,13 @@ rb_stat_z(VALUE obj) /* * call-seq: - * state.size -> integer + * stat.size? -> Integer or nil * - * Returns the size of <i>stat</i> in bytes. + * Returns +nil+ if <i>stat</i> is a zero-length file, the size of + * the file otherwise. * - * File.stat("testfile").size #=> 66 + * File.stat("testfile").size? #=> 66 + * File.stat("/dev/null").size? #=> nil * */ |