From: Rajarshi Chakravarty Date: 2010-08-24T20:04:12+09:00 Subject: Newbie question on file reading Hi, I have got the code to read a file line by line amd it works too but I don't understand it. fp = File.open(dataFile, "r") fp.each_line do |line| puts line end My question is: the "open" method is not mentioned in the doc of File class http://ruby-doc.org/core/classes/File.html What type does it return? My 2nd question is how can I read a file char by char. Basically the file doesn't have line breaks. Please help.. -- Posted via http://www.ruby-forum.com/.