{"push_id":1015853341,"size":1,"distinct_size":1,"ref":"refs/heads/auto","head":"106a642d384bf456b27ab17d004d63386901aab2","before":"0daccc3ff0cc067102f275d27327e5ee79089919","commits":[{"sha":"106a642d384bf456b27ab17d004d63386901aab2","author":{"email":"5c2bd99229d434a2f7174ea3f8798d821bc7f9ae@barosl.com","name":"Homu"},"message":"Auto merge of #1538 - headius:missing-unlock, r=segiddins\n\nEnsure we unlock the monitor even if try_activate throws.\n\n# Description:\n\nNot all paths ensured the monitor was unlocked. Specifically `try_activat`e could throw here (possibly exposing an internal bug, but still) and leave the monitor locked, preventing any future requires from entering the Gem require. This patch modifies the `try_activate` logic to always unlock the monitor, success or fail.\n\nSee jruby/jruby#3652.\n\nI'm not sure how best to test this; the original report has a\nrather complicated env setup not suitable for RG test suite.\n\nThere may be locking required around the iteration of\nGem.loaded_specs, in case parallel gem activation is attempting to\nmutate that structure concurrently.\n\n# Tasks:\n\n- [x] Describe the problem / feature\n- [x] Write tests\n\nI'm not sure how to write a test for this. We'd have to get `try_activate` to raise.\n\n- [x] Write code to solve the problem\n- [ ] Get code review from coworkers / friends\n- [x] [Squash commits](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html)\n\nI will abide by the [code of conduct](https://github.com/rubygems/rubygems/blob/master/CODE_OF_CONDUCT.md).","distinct":true,"url":"https://api.github.com/repos/rubygems/rubygems/commits/106a642d384bf456b27ab17d004d63386901aab2"}]}