summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-07-10 19:18:48 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-07-10 19:21:47 +0900
commitc8d0470bb0888bcb6719ba536e5f3f6a8b6551bb (patch)
tree98536f216cd90b7987629c95b8d2f03f2ec9a3e6 /file.c
parent092c9b266ab3175c40a78e8af99bb82a0f3d2f4b (diff)
Use `File::NULL` instead of hard coded null device names
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/8050
Diffstat (limited to 'file.c')
-rw-r--r--file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/file.c b/file.c
index d9446e6dcf..0966d5bb23 100644
--- a/file.c
+++ b/file.c
@@ -4971,7 +4971,7 @@ rb_file_s_extname(VALUE klass, VALUE fname)
*
* Returns the string representation of the path
*
- * File.path("/dev/null") #=> "/dev/null"
+ * File.path(File::NULL) #=> "/dev/null"
* File.path(Pathname.new("/tmp")) #=> "/tmp"
*
*/
@@ -6086,7 +6086,7 @@ rb_stat_z(VALUE obj)
* the file otherwise.
*
* File.stat("testfile").size? #=> 66
- * File.stat("/dev/null").size? #=> nil
+ * File.stat(File::NULL).size? #=> nil
*
*/