Forum: Ruby Re: Array resizing

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Kroeger, Simon (ext) (Guest)
on 2006-03-28 18:08
(Received via mailing list)
> ]
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
Marcin MielżyÅ?ski (Guest)
on 2006-03-28 19:34
(Received via mailing list)
Kroeger, Simon (ext) wrote:

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

maybe Array#size= would be more Rubyesque :D

lopex
This topic is locked and can not be replied to.