Add workaround for Ruby garbage collection bug
Add workaround for Ruby garbage collection bug

The Ruby interpreter has a bug in `String#concat` where the appended
array may be garbage collected prematurely because the compiler
optimized out a Ruby stack variable. We now call `to_ary` on the
Protobuf object to ensure the array lands on the Ruby stack so the
garbage collector sees it.

The real fix in the interpreter is described in
https://bugs.ruby-lang.org/issues/18140#note-2, but most current Ruby
interpreters won't have this fix for some time.

lfittl/pg_query,jcsjcs/pg_query,jcsjcs/pg_query,jcsjcs/pg_query,lfittl/pg_query