From: Nobuyoshi Nakada Date: 2008-12-05T10:40:56+09:00 Subject: [ruby-core:20347] Re: [Bug #822] gets blocks when it shouldn't Hi, At Fri, 5 Dec 2008 04:39:12 +0900, Brian Candler wrote in [ruby-core:20318]: > Maybe this is a documentation error then. ri IO.gets only > says: "two successive newlines in the input separate > paragraphs". Perhaps it should say "a sequence of two or more > successive newlines"? Perhaps. > And also mention that such a sequence is replaced with two > newlines? It is "dropped" rather than "replaced". How do you think this? Index: io.c =================================================================== --- io.c (revision 20531) +++ io.c (working copy) @@ -1771,5 +1771,6 @@ rb_io_gets(io) * sep_string. A separator of nil reads the entire * contents, and a zero-length separator reads the input a paragraph at - * a time (two successive newlines in the input separate paragraphs). + * a time (two successive newlines in the input separate paragraphs, + * and following successive newlines are dropped). * The stream must be opened for reading or an IOError * will be raised. The line read in will be returned and also assigned -- Nobu Nakada