My 2 solutions:
['h','e','l','l','o',', ','w','o','r','l','d','!'].inject{|v, m| v + m}
# ---
module Hello; def self.included(klass); klass.hello ', world!'; end; end
class World
def self.method_missing(method_name, *args)
puts method_name.to_s + args[0]
end
include Hello
end
Regards.
--
"Computer science education cannot make anybody an expert programmer any more
than studying brushes and pigment can make somebody an expert painter."
(Eric Raymond)
+-------------------------------------+
Gastóî Ramos
http://gastonramos.wordpress.com/
GNU/Linux Counter user #450312