socket/pure_ruby: favor String#clear if available
commitc9077a28044b32799dfd512620d25cb3cba0c6c4
authorEric Wong <e@80x24.org>
Tue, 19 Jun 2018 03:57:14 +0000 (19 03:57 +0000)
committerEric Wong <e@80x24.org>
Tue, 19 Jun 2018 23:59:49 +0000 (19 23:59 +0000)
tree8215a42db499b7652aede83df63dd6d868a2b45d
parent58c56c24325584c5c58feba5d1502c054a89f0a1
socket/pure_ruby: favor String#clear if available

String#replace keeps garbage around a bit longer,
so it's not always the better option.

cf. http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/86983
    https://public-inbox.org/ruby-core/20180511033641.GA4459@dcvr/
lib/mogilefs/socket/pure_ruby.rb