title: Using Ruby's "ready?" IO method with gets, puts, etc
body: <p>The standard Ruby library "io/wait" provides a method on IO objects <code>ready?</code> that returns non-nil if there is input available, nil or false otherwise.  I know some methods like <code>sysread</code> and <code>syswrite</code> are not safe to use with higher level methods such as <code>gets</code> and <code>read</code>, and wanted to know if <code>ready?</code> was safe to mix with the higher level methods.  The ready method seems rather useful and perhaps more elegant than relying on <code>IO.select</code>, but, surprisingly enough, I haven't seen it used much.  There is nothing in the <a href="http://ruby-doc.org/stdlib/libdoc/io/wait/rdoc/index.html" rel="nofollow noreferrer">documentation</a> to indicate it would be unsafe to use with <code>read</code> or <code>gets</code>, I just want to be sure I'm not mixing incompatible methods that could ultimately result in unexpected behavior when reading/writing sockets.</p>
  
  <p><strong>Edit</strong>: I suppose I should mention I am using Ruby 1.8.7.</p>