From 3537afda471cb29cc07d68c46dbe0f8f7a4577a4 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 23 Sep 2006 21:55:46 +0000 Subject: * 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 --- io.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'io.c') diff --git a/io.c b/io.c index afd80af70c..342fb5697a 100644 --- a/io.c +++ b/io.c @@ -3689,19 +3689,12 @@ rb_io_print(int argc, VALUE *argv, VALUE out) argv = &line; } for (i=0; i0) { + 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); } -- cgit v1.2.3