File.open("output.txt", "w") do |file| file.write("Hello, Ruby!\n") end