From f9df459a31bef331ed0610b859effde63ea9a674 Mon Sep 17 00:00:00 2001 From: nahi Date: Mon, 21 Dec 2009 06:33:05 +0000 Subject: * ext/stringio/stringio.c (strio_getline): fix for "" as separator. [ruby-dev:34591] (Backport r17739 by Yusuke Endoh from trunk). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@26140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/stringio/stringio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/stringio/stringio.c') diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c index 16a836454f..c38c92eb82 100644 --- a/ext/stringio/stringio.c +++ b/ext/stringio/stringio.c @@ -935,7 +935,7 @@ strio_getline(argc, argv, ptr) s = p; while ((p = memchr(p, '\n', e - p)) && (p != e)) { if (*++p == '\n') { - e = p; + e = p + 1; break; } } -- cgit v1.2.3