Yes, I experienced mangled output. It seems that `puts` is not atomic, `puts "foo"` prints "foo" and then checks for "\n" presence at the end (see http://ruby-doc.org/core-1.9.3/IO.html#method-i-puts) and prints it if it's missing. There are basically two separate writes internally.

Without the mutex `puts` outputs might be mixed, e.g. running

```ruby
puts "foo"
puts "bar"
```

in parallel might sometimes result in

```
foobar\n
\n
```

instead of expected
```
foo\n
bar\n
```

Maybe using `print "foo\n"` could do the trick, but that would need changing all messages...