A
Amitraj singh Chouhan
Hi all,
Ruby is a dynamically typed language so it checks at run time the type
of the variable and calls corresponding operator. For example "x + y"
will be checked for type of x and y if both will be fixnum then
corresponding addition action will be performed if both are strings the
corresponding appending action will be performed.
My question is"
Is there any type specific operator facility available in ruby? If
somehow we can infer the type of the variables then we can directly use
those specific operators. I am not aware about any such operator. IF
there is any please give me the references.
Thanks
amitraj
Ruby is a dynamically typed language so it checks at run time the type
of the variable and calls corresponding operator. For example "x + y"
will be checked for type of x and y if both will be fixnum then
corresponding addition action will be performed if both are strings the
corresponding appending action will be performed.
My question is"
Is there any type specific operator facility available in ruby? If
somehow we can infer the type of the variables then we can directly use
those specific operators. I am not aware about any such operator. IF
there is any please give me the references.
Thanks
amitraj