Ruby - File IO
This Ruby code tries to open a file for reading and writing:
What is the problem here?
File.open('data.txt', 'r') do |f|
f.puts 'New line'
endWhat is the problem here?
File.open('data.txt', 'r') do |f|
f.puts 'New line'
end15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions