improve gem loading to prevent mismatch
match major <=> major, and minor <=> minor
refactor to lambda and remove constant use warning
Merge pull request #1020 from rspec/improve_gem_loading

Improve gem loading to prevent mismatch