Ruby/File Directory/IO.flush

Материал из Wiki.crossplatform.ru

(Различия между версиями)
Перейти к: навигация, поиск
м (1 версия)
 

Текущая версия на 17:57, 13 сентября 2010

write strings to the stream (buffer) with the

ios = IO.new( 1, "w" )
ios.puts "IO, IO, it"s off to the computer lab I go."
ios << "Ask not " << "for whom the bells toll." << " -John Donne"
ios.flush # => Ask not for whom the bells toll. -John Donne