Minesweeper by shinh (leonid,kinaba)

#!ruby -p0
gsub('.'){($/*18+$_)[$`.size,99].unpack('c3s7'*3).count ?*}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return top