-
-
Save anonymous/cb0b977c45fad4fdcb8a09b3de67d650 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open('result.txt', 'w') { |f| | |
f.puts id | |
f.puts exam | |
} | |
#I'm calling this inside a loop. But every time, the result.txt is created and removing the existing line. How can I keep the added lines? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment