Basic Input and Output(Chapter 11 of Programming Ruby)
1 while line = gets
2 puts line
3 end
4
5 File.open('test.txt', 'w') do |file|
6 file.puts "Hello, Ray"
7 end
2 puts line
3 end
4
5 File.open('test.txt', 'w') do |file|
6 file.puts "Hello, Ray"
7 end