Patrick Doyle wrote:
> and I would also like to know why
> 
> x = Array.new()
> => []
> x === Array
> => false
> 
> I've just got to teach to use:
> 
> case x
> when Array
>    ...
> end
> 
> instead of
> if x === Array
>    ...
> end
> 
> ...the few times I want to do something only when x is an array.
> 
> --wpd

Forgive me if I'm missing something obvious, but wouldn't it be a whole 
lot more logical to do this?

if x.is_a? Array
  ...
end

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