Ruby equivalent of C# StringCollection container?

What is the Ruby equivalent of the C# StringCollection container?

I'm trying to port some C# code over to Ruby.

Thanks.

Robert

Just use an Array:

a = ['rich', 'dave', 'tom']
a << 'james'

puts a.join(', ') #=> rich, dave, tom, james

see: http://www.ruby-doc.org/docs/rdoc/1.9/classes/Array.html

Since Ruby's variables are not statically typed, you don't need to have
containers for specific classes as you need to do in C#.

-rich

···

On 7/18/04 10:57 PM, "Robert Oschler" <no_replies@fake_email_address.invalid> wrote:

What is the Ruby equivalent of the C# StringCollection container?

I'm trying to port some C# code over to Ruby.

Thanks.

Robert

Richard,

Ok thanks. I was concerned there might be other aspects of the C#
StringCollection (such as insertion times, indexed or unindexed lookups,
etc.) that I might not be aware of, which would affect the correct container
choice in Ruby. I'm not an experienced C# coder. My background is C++ and
Object Pascal.

Thanks,

···

--
Robert

"Richard Kilmer" <rich@infoether.com> wrote in message
news:BD20B331.E890%rich@infoether.com...

Just use an Array:

a = ['rich', 'dave', 'tom']
a << 'james'

puts a.join(', ') #=> rich, dave, tom, james

see: http://www.ruby-doc.org/docs/rdoc/1.9/classes/Array.html

Since Ruby's variables are not statically typed, you don't need to have
containers for specific classes as you need to do in C#.

-rich