rubyspec/rubyspec — pull request #299 by L2G (2014-11-21 00:40:14+00:00)
Title: ENV.shift specs need to save/restore ENV in a couple more places

In core/env/shift_spec.rb, there are a couple of places where ENV.shift is called but ENV is never restored. For me, this causes Bundler to freak out repeatedly when specs after core/env/shift_spec.rb are run. The telltale message was: "git://github.com/ffi/ffi.git (at master) is not yet checked out. Run `bundle install` first. (Bundler::GitError)"

I put in a couple more begin/ensure/end blocks to patch this. This fixes the problem for me.