Nikhil Warade said:
Please check
http://codegolf.com/reverse where we need to input using
STDIN
You don't seem to have used STDIN
gets works on the standard input if you insist you can write
STDIN.gets if that makes you feel better
STDIN.public_methods.sort
=> ["<<", "==", "===", "=~", "__id__", "__send__", "all?", "any?",
"binmode", "class", "clone", "close", "close_read", "close_write",
"closed?", "collect", "detect", "display", "dup", "each", "each_byte",
"each_line", "each_with_index", "entries", "eof", "eof?", "eql?",
"equal?", "extend", "fcntl", "fileno", "find", "find_all", "flush",
"freeze", "frozen?", "fsync", "getc", "gets",
^^^^^^ here is your gets
Friedrich