Sha256: 8807cd2cc6e7561f56b54eba6199acf2111e9cf03841b545d548e00a2a596ed5
Contents?: true
Size: 303 Bytes
Versions: 9
Compression:
Stored size: 303 Bytes
Contents
# Ruby may implement #puts with two calls to #print: One for the # value, and one for the new-line. Do that, in order to flush # out thread-safety bugs. class ThreadUnsafeStringIO < StringIO def puts(*args) args.each do |arg| print arg Thread.pass print "\n" end end end
Version data entries
9 entries across 9 versions & 1 rubygems