This is a good and difficult question. Let me answer in three parts.
First part
To find a definition, it is important to understand that the name of the method is "Array", etc., which can be quite inconsistent, since methods usually have lowercase letters ...
irb> method(:Array) =>
This tells you that they are defined in the kernel and thus are available everywhere without requiring an explicit prefix.
The second part
Array() , String() , ... are conversion methods. Calling obj.to_a will return an array, but raise a NoMethodError if obj does not respond_to? :to_a respond_to? :to_a . Therefore, the typical case is when you prefer to use Array() , String() instead of to_a or to_s , when you are not sure that the object is responding to this conversion method.
String(obj) will return nil if obj does not respond_to? :to_s respond_to? :to_s . String (obj) will also verify that the result of to_s is actually a string; it should be, but maybe a too creative programmer decided to return something else?
Most other conversion methods work the same, but Array(obj) is different. It will return [obj] if obj does not respond_to? :to_a respond_to? :to_a . It actually calls to_ary (this is an implicit conversion operation, and to_a is explicit).
There is another important way to convert objects to 1.9 (and future 1.8.8): Array.try_convert(obj) . Does this return nil if obj does not respond_to? :to_ary respond_to? :to_ary . He will not call to_a . Although they are longer for input, you can use them when writing very general code that can accept different types of objects, and you want, for example, to avoid converting the hash into an array, for example (since Hash has a to_a method but not to_ary ). When your method requires an object like an array, and you are ready to do an explicit conversion, then obj.to_a will be fine. A typical use of Array(obj) will be in a method that takes either one obj for an action or a list of objects (although this is usually written as [*obj] ).
the last part
Hopefully the answers to the first two parts will give you the final answer ...
You can use:
[Integer, String, Array].each {|klass| klass.try_convert(foo) }
or
[:Integer, :String, :Array].each{|method| send(method, obj)}