This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'securerandom' | |
#------------------------------------------------------------------------------------ | |
# Requirement: | |
# Read original file of 35mb, it should write 25mb of data to duplicate file. | |
#------------------------------------------------------------------------------------ | |
original = "/Downloads/all/original.txt" | |
duplicate = "/Downloads/all/duplicate.txt" | |
MEGABYTE = 25 * 1024 | |
file2 = File.open(duplicate, 'a') |