s = "[text\nhere]"puts s.start_with?("[") and s.end_with?("]")
Standard input is empty
true
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!