From: Tamara Temple Date: 2013-06-05T10:00:56+09:00 Subject: Re: Longer user input? Zeil Era wrote: > I think the maximum number of characters in user input ('gets') is 254. > The input that I need to have is a piece of BBCode and it is longer > than 254 characters. So my question is: is there any way to get longer > user input, and if not, is there a way to get around this? Seriously. longstring = "x"*10_000 puts "length of longstring: #{longstring.size}" File.open('/tmp/longfile.txt','w') do |f| f.puts longstring end File.open('/tmp/longfile.txt','r') do |f| longstringin = f.gets.chomp raise "strings are not the same!" unless longstring == longstringin end puts "same" Output ====== length of longstring: 10000 same