summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-09-23 21:55:46 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-09-23 21:55:46 +0000
commitcca687cccebe9983883f0b031135386adf8cae9c (patch)
tree089e877376c6268a1590761d3583ce318ff5a238
parent02e9757ee06650714bfd1a386087d78d68f4a78c (diff)
downloadruby-cca687cccebe9983883f0b031135386adf8cae9c.tar.gz
ruby-cca687cccebe9983883f0b031135386adf8cae9c.tar.xz
ruby-cca687cccebe9983883f0b031135386adf8cae9c.zip
* io.c (rb_io_print): no special handling for nil as well as puts.
fixed: [ruby-dev:29586] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog7
-rw-r--r--io.c13
2 files changed, 9 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index a6a7aecc8..9d4ee9f86 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,11 @@
+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):
+ * eval.c (rb_thread_save_context, rb_thread_restore_context):
sandbox hook to save and restore sandbox state.
* eval.c (thread_no_ensure): added THREAD_NO_ENSURE thread flag.
diff --git a/io.c b/io.c
index afd80af70..342fb5697 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; 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);
}