On 08/30/10 10:33, Jean-Julien Fleck wrote:
>> how can I write case statement to check of specific type the variable has?
>> Something like:
>
> It simpler:
>
>> case var
>> when :Fixnum
>>   puts "#{var} is Fixnum"
>> when :String
>>   puts "#{var} is String"
>> end
>
> case var
> when Fixnum
>   puts "#{var} is Fixnum"
> when String
>   puts "#{var} is String"
> end
>
> (no ":")
>
> Cheers,
>

Hi, could you explain me why this works? It's a special behaviour of the 
"case" statment?