summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authorAkinori MUSHA <knu@idaemons.org>2021-08-17 21:44:41 +0900
committerAkinori MUSHA <knu@idaemons.org>2021-08-17 21:44:41 +0900
commit48145282969230ba4a7c8cc7a6aedfd1263900c4 (patch)
tree8f2b599b9fe6f74fe7e7be3f2976f382f6c67f68 /file.c
parentedf01d4e82d8e44ee30ec41fbcb7f802bc8b8c5d (diff)
[DOC] Fix the rdoc for File::Stat#size? [ci skip]
Diffstat (limited to 'file.c')
-rw-r--r--file.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/file.c b/file.c
index 4ea8de6d20..41ebf863b6 100644
--- a/file.c
+++ b/file.c
@@ -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
*
*/