What is the difference between ‘File.read’ and ‘IO.read’?

Editor’s note: This answer is out of date. As of Ruby 2.6, File.read is different in that it does not invoke external commands for filenames that start with a “|” character (issue, commit).

since File is a subclass of IO and it does not have the read method, when you invoke File.read, you are actually calling IO.read
no difference here.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)