Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class IO
- def hello_world
- path = "fileio.txt"
- writeFile(path, "hello") do |file|
- file = File.open(path, "a") do
- write(file, "\nworld") do
- close(file) do
- data = read(path) do
- puts data.last
- end
- end
- end
- end
- end
- end
- end
- IO.new.hello_world
Add Comment
Please, Sign In to add comment