rdoc/rdoc — pull request #135 by guyboltonking (2012-07-09 14:49:41+00:00)
Title: Ensure that we're checking the correct child status in setup_pager

The test for whether the pager has been opened in setup_pager fails when `$?` has already been set by another child process being reaped (for example, running a command in backticks). This can happen when all of the following are satisfied:

* `ri` is run with `bundle exec`;
* the Gemfile refers to a git repo;
* the gemspec in the git repo spawns a process (such as running `git ls-files` in backticks).

This can result in the terminal becoming unusable if control characters are in the ri output, necessitating saying `reset` to it!

I've changed the test in driver.rb to check whether `$?` refers to the correct process, and added a unit test to check this.