Hello people,

Lets say i have
arr = [100]
and
i = 100

Now i do calculation:
i * arr[0] ==> 10000 # works ok
but
i * arr ==> Error

Why arr != arr[0] with only one element in the array?


And is there a way to 'free' the first and only object in arr?
As if it never belonged to an array, like 'i' ?

I know with a float or integer one can use:

a.to_s.to_i or a.to_s.to_f

but how about other objects?

Thanx for your thoughts!

-- 
Posted via http://www.ruby-forum.com/.