Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
A bit of File{.,#}{size,truncate}
- Loading branch information
Showing
3 changed files
with
14 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,8 @@ | ||
fails:File.size? calls #to_io to convert the argument to an IO | ||
fails:File.size? accepts a File argument | ||
fails:File.size returns the size of the file if it exists and is not empty | ||
fails:File.size accepts a String-like (to_str) parameter | ||
fails:File.size accepts an object that has a #to_path method | ||
fails:File.size calls #to_io to convert the argument to an IO | ||
fails:File.size raises an error if file_name doesn't exist | ||
fails:File.size returns 0 if the file is empty | ||
fails:File.size accepts a File argument | ||
fails:File#size is an instance method | ||
fails:File#size returns the file's size as a Fixnum | ||
fails:File#size returns the file's size in bytes | ||
fails:File#size returns the cached size of the file if subsequently deleted | ||
fails:File#size returns the file's current size even if modified | ||
fails:File#size raises an IOError on a closed file | ||
fails:File#size follows symlinks if necessary | ||
fails:File#size for an empty file returns 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters