p (1...1000).select{|x| x % 3 == 0 || x % 5 == 0}.inject(:+)
Standard input is empty
233168
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!