add ruby solution for ex 1