# Review: Array\\to\_s fix for : properly handles recursive array

**URL:** <https://www.ruby-forum.com/t/review-array-to-s-fix-for-properly-handles-recursive-array/167733>\
**Category:** IronRuby\
**Created:** [May 12, 2009, 3:02am UTC](https://www.ruby-forum.com/t/review-array-to-s-fix-for-properly-handles-recursive-array/167733 "2009-05-12T03:02:58Z")\
**Posts on this page:** 6\
**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:** [May 12, 2009, 3:02am UTC](https://www.ruby-forum.com/t/review-array-to-s-fix-for-properly-handles-recursive-array/167733/1 "2009-05-12T03:02:58Z")

</div>

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

Modified IListOps to fix the recursive array problem during to\_s call.

It used to only print the values in the array, and skip over arrays in  
the array that contains the same values.

However, to conform with mri, I modified it so it will walk into the  
array and print the values for only one level deep, then print the  
remaining arrays with “[…]”.

Files Changed:

- 

Merlin/External.LCA\_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/array/to\_s\_tags.txt  
(deleted)  
\*  
Merlin/External.LCA\_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/env/clear\_tags.txt  
(deleted)  
\*  
Merlin/Main/Languages/Ruby/Libraries.LCA\_RESTRICTED/Extensions/IListOps.cs  
(modified)

Thank you!  
Tim

---

<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:** [May 12, 2009, 3:03am UTC](https://www.ruby-forum.com/t/review-array-to-s-fix-for-properly-handles-recursive-array/167733/2 "2009-05-12T03:03:34Z")

</div>

Forgot to mention that I deleted the tag files that has no more tags in  
it.

Tim

From: removed\_email\_address@domain.invalid  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf Of Tim C. (SDO)  
Sent: Monday, May 11, 2009 6:02 PM  
To: removed\_email\_address@domain.invalid  
Subject: [Ironruby-core] Review: Array\to\_s fix for : properly handles  
recursive array

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

Modified IListOps to fix the recursive array problem during to\_s call.

It used to only print the values in the array, and skip over arrays in  
the array that contains the same values.

However, to conform with mri, I modified it so it will walk into the  
array and print the values for only one level deep, then print the  
remaining arrays with “[…]”.

Files Changed:

- 

Merlin/External.LCA\_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/array/to\_s\_tags.txt  
(deleted)  
\*  
Merlin/External.LCA\_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/env/clear\_tags.txt  
(deleted)  
\*  
Merlin/Main/Languages/Ruby/Libraries.LCA\_RESTRICTED/Extensions/IListOps.cs  
(modified)

Thank you!  
Tim

---

<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:** [May 12, 2009, 4:12am UTC](https://www.ruby-forum.com/t/review-array-to-s-fix-for-properly-handles-recursive-array/167733/3 "2009-05-12T04:12:51Z")

</div>

Hello Tim,  
I would like to share experience about code convention with you. You  
should set a braces on Same Line option  
([http://www.knowdotnet.com/articles/toolsoptionsnewlinesbraces.html](http://www.knowdotnet.com/articles/toolsoptionsnewlinesbraces.html)  
).

Cheers,  
-Jirapong

---

<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:** [May 12, 2009, 8:26pm UTC](https://www.ruby-forum.com/t/review-array-to-s-fix-for-properly-handles-recursive-array/167733/4 "2009-05-12T20:26:46Z")

</div>

Looks good!

From: removed\_email\_address@domain.invalid  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf Of Tim C. (SDO)  
Sent: Tuesday, May 12, 2009 12:12 AM  
To: removed\_email\_address@domain.invalid  
Subject: Re: [Ironruby-core] Review: Array\to\_s fix for : properly  
handles recursive array

It is the first time I modify the ruby source 🙂 so sorry for the  
ignorance.

I would change those and push them again.

Thanks for the feedback!

Tim

* * *

From: removed\_email\_address@domain.invalid  
[removed\_email\_address@domain.invalid] on behalf of  
removed\_email\_address@domain.invalid [removed\_email\_address@domain.invalid]  
Sent: Monday, May 11, 2009 7:11 PM  
To: removed\_email\_address@domain.invalid  
Subject: Re: [Ironruby-core] Review: Array\to\_s fix for : properly  
handles recursive array  
Hello Tim,  
I would like to share experience about code convention with you. You  
should set a braces on Same Line option  
([http://www.knowdotnet.com/articles/toolsoptionsnewlinesbraces.html](http://www.knowdotnet.com/articles/toolsoptionsnewlinesbraces.html)).

Cheers,  
-Jirapong

On May 12, 2009, at 8:03 AM, Tim C. (SDO) wrote:

Forgot to mention that I deleted the tag files that has no more tags in  
it.

Tim

From:  
removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf Of Tim C. (SDO)  
Sent: Monday, May 11, 2009 6:02 PM  
To: removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: [Ironruby-core] Review: Array\to\_s fix for : properly handles  
recursive array

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

Modified IListOps to fix the recursive array problem during to\_s call.

It used to only print the values in the array, and skip over arrays in  
the array that contains the same values.

However, to conform with mri, I modified it so it will walk into the  
array and print the values for only one level deep, then print the  
remaining arrays with “[…]”.

Files Changed:

- 

Merlin/External.LCA\_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/array/to\_s\_tags.txt  
(deleted)  
\*  
Merlin/External.LCA\_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/env/clear\_tags.txt  
(deleted)  
\*  
Merlin/Main/Languages/Ruby/Libraries.LCA\_RESTRICTED/Extensions/IListOps.cs  
(modified)

Thank you!  
Tim

---

<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:** [May 12, 2009, 8:59pm UTC](https://www.ruby-forum.com/t/review-array-to-s-fix-for-properly-handles-recursive-array/167733/5 "2009-05-12T20:59:06Z")

</div>

Looks good.

From: removed\_email\_address@domain.invalid  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf Of Tim C. (SDO)  
Sent: Monday, May 11, 2009 6:03 PM  
To: removed\_email\_address@domain.invalid  
Subject: Re: [Ironruby-core] Review: Array\to\_s fix for : properly  
handles recursive array

Forgot to mention that I deleted the tag files that has no more tags in  
it.

Tim

From: removed\_email\_address@domain.invalid  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf Of Tim C. (SDO)  
Sent: Monday, May 11, 2009 6:02 PM  
To: removed\_email\_address@domain.invalid  
Subject: [Ironruby-core] Review: Array\to\_s fix for : properly handles  
recursive array

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

Modified IListOps to fix the recursive array problem during to\_s call.

It used to only print the values in the array, and skip over arrays in  
the array that contains the same values.

However, to conform with mri, I modified it so it will walk into the  
array and print the values for only one level deep, then print the  
remaining arrays with “[…]”.

Files Changed:

- 

Merlin/External.LCA\_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/array/to\_s\_tags.txt  
(deleted)  
\*  
Merlin/External.LCA\_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/env/clear\_tags.txt  
(deleted)  
\*  
Merlin/Main/Languages/Ruby/Libraries.LCA\_RESTRICTED/Extensions/IListOps.cs  
(modified)

Thank you!  
Tim

---

<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:** [May 12, 2009, 9:25am UTC](https://www.ruby-forum.com/t/review-array-to-s-fix-for-properly-handles-recursive-array/167733/6 "2009-05-12T09:25:12Z")

</div>

It is the first time I modify the ruby source 🙂 so sorry for the  
ignorance.

I would change those and push them again.

Thanks for the feedback!

Tim

* * *

From: removed\_email\_address@domain.invalid  
[removed\_email\_address@domain.invalid] on behalf of  
removed\_email\_address@domain.invalid [removed\_email\_address@domain.invalid]  
Sent: Monday, May 11, 2009 7:11 PM  
To: removed\_email\_address@domain.invalid  
Subject: Re: [Ironruby-core] Review: Array\to\_s fix for : properly  
handles recursive array

Hello Tim,  
I would like to share experience about code convention with you. You  
should set a braces on Same Line option  
([http://www.knowdotnet.com/articles/toolsoptionsnewlinesbraces.html](http://www.knowdotnet.com/articles/toolsoptionsnewlinesbraces.html)).

Cheers,  
-Jirapong

On May 12, 2009, at 8:03 AM, Tim C. (SDO) wrote:

Forgot to mention that I deleted the tag files that has no more tags in  
it.

Tim

From:  
removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf Of Tim C. (SDO)  
Sent: Monday, May 11, 2009 6:02 PM  
To: removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: [Ironruby-core] Review: Array\to\_s fix for : properly handles  
recursive array

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

Modified IListOps to fix the recursive array problem during to\_s call.

It used to only print the values in the array, and skip over arrays in  
the array that contains the same values.

However, to conform with mri, I modified it so it will walk into the  
array and print the values for only one level deep, then print the  
remaining arrays with â€œ[â€¦]â€.

Files Changed:

- 

Merlin/External.LCA\_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/array/to\_s\_tags.txt  
(deleted)  
\*  
Merlin/External.LCA\_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/env/clear\_tags.txt  
(deleted)  
\*  
Merlin/Main/Languages/Ruby/Libraries.LCA\_RESTRICTED/Extensions/IListOps.cs  
(modified)

Thank you!  
Tim
