# Stdin

**URL:** <https://www.ruby-forum.com/t/stdin/135624>\
**Category:** Ruby\
**Created:** [April 23, 2008, 6:03pm UTC](https://www.ruby-forum.com/t/stdin/135624 "2008-04-23T18:03:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chinnakaruppan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c4cdca/32.png) [@chinnakaruppan](https://www.ruby-forum.com/u/chinnakaruppan)\
**Post date:** [April 23, 2008, 6:03pm UTC](https://www.ruby-forum.com/t/stdin/135624/1 "2008-04-23T18:03:02Z")

</div>

Hi,  
I was trying to use the STDIN.read in the IRB .This keep eating what  
ever I type .it never comes to the next line.I am not sure what is  
happening …I not that famailiar with IO blocking …probably the  
STDIN blocked something for reading…  
can some point to some kind of tutorial on Ruby’s IO or explain what is  
wrong with STDIN.read  
THnks  
Chinna

---

<div class="post-metadata">

**Author:** ![chinnakaruppan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c4cdca/32.png) [@chinnakaruppan](https://www.ruby-forum.com/u/chinnakaruppan)\
**Post date:** [April 23, 2008, 6:47pm UTC](https://www.ruby-forum.com/t/stdin/135624/2 "2008-04-23T18:47:42Z")

</div>

On 4/23/08, Chinna K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi,  
> I was trying to use the STDIN.read in the IRB .This keep eating what  
> ever I type .it never comes to the next line.I am not sure what is  
> happening …

the read method without any arguments will read until the end of file.  
For stdin  
you can signal end-of-file by typing Ctrl-Z.

irb(main):002:0\> s=STDIN.read  
hello  
world  
^Z  
=\> “hello\nworld\n”
