Specs for where $_ is defined and when it is defined?

I think your question is addressed below in comments, but I'll try to summarize it here:

Yes, you need all the moving pieces to write an adequate spec, but this original patch combines several things: a) $_ default value, b) $_ described by `#defined?`, c) whether $_ is set by `#gets`, d) whether $_ state is visible from another frame. Try to separate those.