Is there any way to set a maximum line length for gets? I want an
exception to be raised if gets can't find the sepstring within a given
number of bytes. This is good to prevent things like DoS attacks against
scripts. Do I need to roll my own gets method to get this functionality?

Thanks,
Mathew Johnston