# Re: Array resizing

**URL:** <https://www.ruby-forum.com/t/re-array-resizing/89070>\
**Category:** Ruby\
**Created:** [March 28, 2006, 4:08pm UTC](https://www.ruby-forum.com/t/re-array-resizing/89070 "2006-03-28T16:08:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![KroegerS\_Simon\_Sext](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/57b2e6/32.png) [@KroegerS\_Simon\_Sext](https://www.ruby-forum.com/u/KroegerS_Simon_Sext)\
**Post date:** [March 28, 2006, 4:08pm UTC](https://www.ruby-forum.com/t/re-array-resizing/89070/1 "2006-03-28T16:08:13Z")

</div>

> ]  
> a = [[1,2,3], [1], [1,2,3,4]]  
> p SyncEnumerator.new(\*a).map{|s| s}  
> #=\> [[1, 1, 1], [2, nil, 2], [3, nil, 3], [nil, nil, 4]]

> I think, it isn’t sole case, when we can want having array of  
> arbitrary  
> size.

At least an Array#resize wouldn’t hurt.

> > David
> 
> Victor.

cheers

Simon

---

<div class="post-metadata">

**Author:** ![KroegerS\_Simon\_Sext](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/57b2e6/32.png) [@KroegerS\_Simon\_Sext](https://www.ruby-forum.com/u/KroegerS_Simon_Sext)\
**Post date:** [March 28, 2006, 5:34pm UTC](https://www.ruby-forum.com/t/re-array-resizing/89070/2 "2006-03-28T17:34:34Z")

</div>

Kroeger, Simon (ext) wrote:

> At least an Array#resize wouldn’t hurt.

maybe Array#size= would be more Rubyesque 😃

lopex
