mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
merge revision(s) 17352:
* ext/stringio/stringio.c (strio_readline, strio_each) (strio_readlines): set lastline. [ruby-core:17257] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@17660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9ba0dcb904
commit
40303dfb05
3 changed files with 9 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Sun Jun 29 17:19:59 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:15:49 2008 NAKAMURA Usaku <usa@ruby-lang.org>
|
Sun Jun 29 17:15:49 2008 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
* ext/openssl/ossl.h: include winsock.h if USE_WINSOCK2 is not defined.
|
* ext/openssl/ossl.h: include winsock.h if USE_WINSOCK2 is not defined.
|
||||||
|
|
|
@ -990,7 +990,7 @@ strio_readline(argc, argv, self)
|
||||||
VALUE *argv;
|
VALUE *argv;
|
||||||
VALUE self;
|
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();
|
if (NIL_P(line)) rb_eof_error();
|
||||||
return line;
|
return line;
|
||||||
}
|
}
|
||||||
|
@ -1014,6 +1014,7 @@ strio_each(argc, argv, self)
|
||||||
RETURN_ENUMERATOR(self, argc, argv);
|
RETURN_ENUMERATOR(self, argc, argv);
|
||||||
|
|
||||||
while (!NIL_P(line = strio_getline(argc, argv, readable(ptr)))) {
|
while (!NIL_P(line = strio_getline(argc, argv, readable(ptr)))) {
|
||||||
|
rb_lastline_set(line);
|
||||||
rb_yield(line);
|
rb_yield(line);
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
|
@ -1036,6 +1037,7 @@ strio_readlines(argc, argv, self)
|
||||||
while (!NIL_P(line = strio_getline(argc, argv, readable(ptr)))) {
|
while (!NIL_P(line = strio_getline(argc, argv, readable(ptr)))) {
|
||||||
rb_ary_push(ary, line);
|
rb_ary_push(ary, line);
|
||||||
}
|
}
|
||||||
|
rb_lastline_set(Qnil);
|
||||||
return ary;
|
return ary;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#define RUBY_RELEASE_DATE "2008-06-29"
|
#define RUBY_RELEASE_DATE "2008-06-29"
|
||||||
#define RUBY_VERSION_CODE 187
|
#define RUBY_VERSION_CODE 187
|
||||||
#define RUBY_RELEASE_CODE 20080629
|
#define RUBY_RELEASE_CODE 20080629
|
||||||
#define RUBY_PATCHLEVEL 25
|
#define RUBY_PATCHLEVEL 26
|
||||||
|
|
||||||
#define RUBY_VERSION_MAJOR 1
|
#define RUBY_VERSION_MAJOR 1
|
||||||
#define RUBY_VERSION_MINOR 8
|
#define RUBY_VERSION_MINOR 8
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue