Ruby - File IO
Which Ruby code snippet correctly reads the entire content of
notes.txt into a variable?notes.txt into a variable?File.read reads the entire file content as a string.File.open(...).each_line returns an enumerator, not a string; File.readlines returns an array of lines.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions