Re-implement COPY approach in Ruby