anyone know if it is possible to pass elements from an array (eg 20,50 )
to the function
number_range(min,max) and have the returned value used in the variable
|age| below...


def number_range(min,max)         # Chooses a random number within
specified range.
  num = min + rand(max - min)
end

array = [ lambda { |age| "An #{age} year old..."}, 20, 50 ]

puts array[0][age returned from number_range method]


>>  An 18 year old...

-- 
Posted via http://www.ruby-forum.com/.