apohllo/srx-english — pull request #3 by louismullie (2012-08-16 22:20:08+00:00)
Title: Use getc instead of readchar to prevent EOFError from crashing segmenter.

`readchar` used in sentence splitter crashes when `@input` is an instance of `StringIO` by raising an `EOFError`. This can be fixed by using `getc` instead (which is called by `readchar` anyway, as per the source below.)

```C
rb_io_readchar(VALUE io)
{
VALUE c = rb_io_getc(io);

if (NIL_P(c)) {
rb_eof_error();
}
return c;
}
```