mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* io.c (rb_io_print): no special handling for nil as well as puts.
fixed: [ruby-dev:29586] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e441b922b9
commit
3537afda47
2 changed files with 9 additions and 11 deletions
|
@ -1,3 +1,8 @@
|
|||
Sun Sep 24 06:55:36 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* io.c (rb_io_print): no special handling for nil as well as puts.
|
||||
fixed: [ruby-dev:29586]
|
||||
|
||||
Sun Sep 24 06:25:53 2006 why the lucky stiff <why@ruby-lang.org>
|
||||
|
||||
* eval.c (rb_thread_save_context, rb_thread_restore_context):
|
||||
|
|
13
io.c
13
io.c
|
@ -3689,19 +3689,12 @@ rb_io_print(int argc, VALUE *argv, VALUE out)
|
|||
argv = &line;
|
||||
}
|
||||
for (i=0; i<argc; i++) {
|
||||
if (!NIL_P(rb_output_fs) && i>0) {
|
||||
rb_io_write(out, argv[i]);
|
||||
if (!NIL_P(rb_output_fs)) {
|
||||
rb_io_write(out, rb_output_fs);
|
||||
}
|
||||
switch (TYPE(argv[i])) {
|
||||
case T_NIL:
|
||||
rb_io_write(out, rb_str_new2("nil"));
|
||||
break;
|
||||
default:
|
||||
rb_io_write(out, argv[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!NIL_P(rb_output_rs)) {
|
||||
if (argc > 0 && !NIL_P(rb_output_rs)) {
|
||||
rb_io_write(out, rb_output_rs);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue