Verifying if character is corrupted, meaning that one more char is needed.

@headius and @enebo this patch fixes the problem we discussed on irc today, specs for readlines and foreach pass, and the File.new('a.txt').gets(5) that Charles did also works.
I came to that comparison "<-1" after debugging the MRI code and seeing that it is exactly what they do there. What do you think about it?