Mega Code Archive
Categories
/
Ruby
/
File Directory
A file handleobject is assigned to f directly
# You close the file handle manually with the close method at the end. f = File.new("text.txt", "r") puts f.gets f.close