From: Robert Klemme Date: 2012-03-26T18:07:17+09:00 Subject: Re: Write to kernel buffer? ruby rub wrote in post #1053018: > memstore = Thread.new { > start = Time.now.to_i > loop do > if Time.now.to_i == (start + 2) then > wipe = StringIO.new("\0" * @password.bytesize) > wipe.read(@password.bytesize, @password) > puts "password cleared" > break > end > end > } I think there's a simpler way to achieve wiping: # read @password = ... # wipe after 2 secs Thread.new do sleep 2 @password.replace("#" * @password.length) end Note though that for both approaches you need proper synchronization. Kind regards robert -- Posted via http://www.ruby-forum.com/.