I'm not sure how that would work....  you're re-reading the input stream twice.

Anyway, here's my version.  I could compact it more, but I won't try
confusing you too much all at once.  =)


figures = STDIN.read.split("\n").map { |x| x.to_f }

sum = figures.inject { |s, x| s + x }
average = sum / figures.size
high = figures.select { |x| x > average }

puts "Average: #{average}"
puts "Count greater than average: #{high.size}"