Reputation: 105
Using 'gets' only uses like half (or less) of the entered string. Is there a way to load the string? (It's 900,000+ characters long)
Upvotes: 0
Views: 66
Reputation: 568
The easiest way to work around this limitation of gets
is to store that 900k character string into a file and then use File.read
to read it:
very_long_string = File.read("./900k_chars")
Upvotes: 3