# Code Review: StringIO and Array.to\_s

**URL:** <https://www.ruby-forum.com/t/code-review-stringio-and-array-to-s/170329>\
**Category:** IronRuby\
**Created:** [June 16, 2009, 1:47am UTC](https://www.ruby-forum.com/t/code-review-stringio-and-array-to-s/170329 "2009-06-16T01:47:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tim\_CSSSDO](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/aeb1de/32.png) [@Tim\_CSSSDO](https://www.ruby-forum.com/u/Tim_CSSSDO)\
**Post date:** [June 16, 2009, 1:47am UTC](https://www.ruby-forum.com/t/code-review-stringio-and-array-to-s/170329/1 "2009-06-16T01:47:09Z")

</div>

Modified RecursiveJoin to have an printRecursiveArray option.  
This is needed since StringIO does not print out recursiveArray values  
while array.to\_s does.

For example:

a = [1,2,3]  
a \<\< a  
@io.puts(a) → prints "1\n2\n3\n[…]\n  
a.to\_s → prints “123123[…]”

Fixed all calls to Join to also pass in printRecursiveArray option.

- 

Merlin/Main/Languages/Ruby/Libraries.LCA\_RESTRICTED/Builtins/IoOps.cs[http://github.com/tnachen/ironruby/commit/759f6007467a0655b2d707f71de1cd5518b65033#diff-0](http://github.com/tnachen/ironruby/commit/759f6007467a0655b2d707f71de1cd5518b65033#diff-0)  
\*  
Merlin/Main/Languages/Ruby/Libraries.LCA\_RESTRICTED/Extensions/IListOps.cs[http://github.com/tnachen/ironruby/commit/759f6007467a0655b2d707f71de1cd5518b65033#diff-1](http://github.com/tnachen/ironruby/commit/759f6007467a0655b2d707f71de1cd5518b65033#diff-1)

[http://github.com/tnachen/ironruby/commit/759f6007467a0655b2d707f71de1cd5518b65033](http://github.com/tnachen/ironruby/commit/759f6007467a0655b2d707f71de1cd5518b65033)

Thanks!

Tim
