Ruby/File Directory/IO.puts

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

Перейти к: навигация, поиск

Write characters to an I/O stream with putc, and retrieve those characters with getc.

ios = IO.new( 1 )
ios.putc "A"
ios.putc "B"
ios.putc "C"
ios.putc "D"
ios.getc => ABCD