Thread#backtrace should never be nil for a living Thread (#581)
Thread#backtrace should never be nil for a living Thread (#581)

On MRI, immediately after a Thread gets created and before it starts
executing, its backtrace is an empty array.

This behavior changed from 2.0 onwards. On 1.9 it returned nil.

Testing for the backtrace of a recently-created Thread is an inherently
racy operation, so instead of specifically testing for an empty Array
let's at least test that we get **an** Array, which seems enough to
guarantee same-ish behavior.

See https://github.com/jruby/jruby/issues/4891
ruby/spec,ruby/rubyspec,eregon/rubyspec,eregon/rubyspec,nobu/rubyspec,nobu/rubyspec,ruby/spec,eregon/rubyspec,ruby/spec,ruby/rubyspec,nobu/rubyspec