summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-03-13 06:59:37 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-03-13 06:59:37 +0000
commit05d4516145a19e2950c53cf39dd95f64f36cedae (patch)
treec4ae8ea5094b1dc2fbc27622ceb5cd5011c08375
parent8b55878d2a0a4032f8be77d60e30172369c82ec6 (diff)
* io.c (rb_io_print): should not print field separator at the end
of arguments. [ruby-talk:358633] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--io.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index d3ae580c53..fba9014f09 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sat Mar 13 15:44:20 2010 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * io.c (rb_io_print): should not print field separator at the end
+ of arguments. [ruby-talk:358633]
+
Sat Mar 13 14:49:55 2010 Yukihiro Matsumoto <matz@ruby-lang.org>
* enum.c (enum_join): remove Enumerable#join. [ruby-core:24786]
diff --git a/io.c b/io.c
index b1a89b4502..dbe39cd95b 100644
--- a/io.c
+++ b/io.c
@@ -5906,10 +5906,10 @@ rb_io_print(int argc, VALUE *argv, VALUE out)
argv = &line;
}
for (i=0; i<argc; i++) {
- rb_io_write(out, argv[i]);
- if (!NIL_P(rb_output_fs)) {
+ if (!NIL_P(rb_output_fs) && i>0) {
rb_io_write(out, rb_output_fs);
}
+ rb_io_write(out, argv[i]);
}
if (argc > 0 && !NIL_P(rb_output_rs)) {
rb_io_write(out, rb_output_rs);