Merge pull request #322 from rspec/refactor_jruby_fix

Refactor the workaround for JRuby 1.7.4