[macruby-changes] [2817] MacRuby/trunk/io.c
source_changes at macosforge.org
source_changes at macosforge.org
Thu Oct 15 15:25:23 PDT 2009
Revision: 2817
http://trac.macosforge.org/projects/ruby/changeset/2817
Author: lsansonetti at apple.com
Date: 2009-10-15 15:25:22 -0700 (Thu, 15 Oct 2009)
Log Message:
-----------
fixed IO#puts with recursive arrays
Modified Paths:
--------------
MacRuby/trunk/io.c
Modified: MacRuby/trunk/io.c
===================================================================
--- MacRuby/trunk/io.c 2009-10-15 22:24:54 UTC (rev 2816)
+++ MacRuby/trunk/io.c 2009-10-15 22:25:22 UTC (rev 2817)
@@ -2615,19 +2615,19 @@
VALUE rb_io_puts(VALUE out, SEL sel, int argc, VALUE *argv);
static VALUE
-io_puts_ary(VALUE ary, SEL sel, VALUE out, int recur)
+io_puts_ary(VALUE ary, VALUE out, int recur)
{
VALUE tmp;
long i, count;
if (recur) {
tmp = rb_str_new2("[...]");
- rb_io_puts(out, sel, 1, &tmp);
+ rb_io_puts(out, 0, 1, &tmp);
return Qnil;
}
for (i = 0, count = RARRAY_LEN(ary); i < count; i++) {
tmp = RARRAY_AT(ary, i);
- rb_io_puts(out, sel, 1, &tmp);
+ rb_io_puts(out, 0, 1, &tmp);
}
return Qnil;
}
@@ -2644,7 +2644,7 @@
for (i = 0; i < argc; i++) {
line = rb_check_array_type(argv[i]);
if (!NIL_P(line)) {
- io_puts_ary(line, sel, out, 0);
+ rb_exec_recursive(io_puts_ary, line, out);
continue;
}
line = rb_obj_as_string(argv[i]);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20091015/0085f2d8/attachment.html>
More information about the macruby-changes
mailing list