* io.c (prepare_getline_args): check if rs is a string when non-nil
lim is given. [ruby-dev:35610] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1b16c560e4
commit
c98b3a7e19
@ -1,3 +1,8 @@
|
|||||||
|
Mon Jul 21 10:25:52 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* io.c (prepare_getline_args): check if rs is a string when non-nil
|
||||||
|
lim is given. [ruby-dev:35610]
|
||||||
|
|
||||||
Mon Jul 21 04:55:20 2008 Tanaka Akira <akr@fsij.org>
|
Mon Jul 21 04:55:20 2008 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* dir.c (dir_initialize): use rb_convert_type instead of
|
* dir.c (dir_initialize): use rb_convert_type instead of
|
||||||
|
5
io.c
5
io.c
@ -1892,7 +1892,10 @@ prepare_getline_args(int argc, VALUE *argv, VALUE *rsp, long *limit, VALUE io)
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
rb_scan_args(argc, argv, "11", &rs, &lim);
|
rb_scan_args(argc, argv, "11", &rs, &lim);
|
||||||
if (NIL_P(lim) && !NIL_P(rs) && TYPE(rs) != T_STRING) {
|
if (!NIL_P(lim)) {
|
||||||
|
StringValue(rs);
|
||||||
|
}
|
||||||
|
else if (!NIL_P(rs) && TYPE(rs) != T_STRING) {
|
||||||
VALUE tmp = rb_check_string_type(rs);
|
VALUE tmp = rb_check_string_type(rs);
|
||||||
|
|
||||||
if (NIL_P(tmp)) {
|
if (NIL_P(tmp)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user