returning an array that contains an array and hash in ruby method? -


Hello

Is it possible to return an array, in which an array and hash with a method in the receipt

i.e.

  def some array_new = [another_thing, another_thing_2] hash_map = get_hash () return [array_new, hash_map] end  

To retrieve the array:

  some_array, some_hash = some ()  

thanks

< Div class = "post-text" itemprop = "text">

Of course, this is absolutely possible and works properly as your example.


Comments