puts [1, 2, 3, 4, 5].each_cons(2).all? { |a, b| a + 1 == b }
Standard input is empty
true
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!