summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--ext/stringio/stringio.c4
-rw-r--r--version.h2
3 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 2376cc2067d..97893aae8d8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sun Jun 29 17:18:45 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/stringio/stringio.c (strio_readline, strio_each)
+ (strio_readlines): set lastline. [ruby-core:17257]
+
Sun Jun 29 17:10:30 2008 NAKAMURA Usaku <usa@ruby-lang.org>
* ext/openssl/ossl.h: include winsock.h if USE_WINSOCK2 is not defined.
diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c
index 7355afd7700..011ccb73ffb 100644
--- a/ext/stringio/stringio.c
+++ b/ext/stringio/stringio.c
@@ -947,7 +947,7 @@ strio_readline(argc, argv, self)
VALUE *argv;
VALUE self;
{
- VALUE line = strio_getline(argc, argv, readable(StringIO(self)));
+ VALUE line = strio_gets(argc, argv, self);
if (NIL_P(line)) rb_eof_error();
return line;
}
@@ -969,6 +969,7 @@ strio_each(argc, argv, self)
VALUE line;
while (!NIL_P(line = strio_getline(argc, argv, readable(ptr)))) {
+ rb_lastline_set(line);
rb_yield(line);
}
return self;
@@ -991,6 +992,7 @@ strio_readlines(argc, argv, self)
while (!NIL_P(line = strio_getline(argc, argv, readable(ptr)))) {
rb_ary_push(ary, line);
}
+ rb_lastline_set(Qnil);
return ary;
}
diff --git a/version.h b/version.h
index 0e06ba65765..9a12c0ca4db 100644
--- a/version.h
+++ b/version.h
@@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2008-06-29"
#define RUBY_VERSION_CODE 186
#define RUBY_RELEASE_CODE 20080629
-#define RUBY_PATCHLEVEL 242
+#define RUBY_PATCHLEVEL 243
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8