From: Per-erik Martin Date: 2013-05-18T22:09:15+09:00 Subject: Re: Ruby 'gets' truncates input to 256 characters (Windows) jen Marsh wrote in post #1109409: > Is this a 'feature' of Ruby on windows? > I am trying to enter a long string (> 256 characters but generally < > 512) in Ruby with: > > puts "Enter long string" > ilogo = gets.chomp > puts ilogo > > For some reason, it always truncates the input to keep only 256 > characters (before chomp). I can't really help with windows (don't have it), but as you said, it doesn't happen on Mac OS X, nor on Linux, but it seems unlikely that it would work differently on Windows. I assume you have checked the actual length of the string, with ilogo.size ? Just to rule out the possibility that something funny is going on with the output of long strings in the console window... -- Posted via http://www.ruby-forum.com/.