How to Read from stdin in Ruby

Reading from stdin in ruby is as easy as calling STDIN.read

STDIN.read.split("\n").each do |a|
   puts a
end

This will just print out everything handed in.