Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Fix drb weirdness #2165

Merged
merged 3 commits into from
Feb 7, 2016
Merged

Fix drb weirdness #2165

merged 3 commits into from
Feb 7, 2016

Conversation

myronmarston
Copy link
Member

Fix DRb specs that are failing for me locally.

As the comment explains, I have had to configure my network
adapter in a non-standard way, and it causes
IPSocket.getaddress(Socket.gethostname) to raise an error
for me.

A couple of the DRb specs were failing as a result. The use of
return from ensure caused the error to be ignored (the fact
that local_drb was not set caused it to return false). This was
confusing, and using return from ensure is a horrible practice. I have refactored to avoid the issue, rescuing
errors explicitly.

As the comment explains, I have had to configure my network
adapter in a non-standard way, and it causes
`IPSocket.getaddress(Socket.gethostname)` to raise an error
for me.

A couple of the DRb specs were failing as a result. The use of
`return` from `ensure` caused the error to be ignored (the fact
that `local_drb` was not set caused it to return false). This was
confusing, and using `return` from `ensure` is a horrible practice. I have refactored to avoid the issue, rescuing
errors explicitly.
@JonRowe
Copy link
Member

JonRowe commented Feb 7, 2016

LGTM

JonRowe added a commit that referenced this pull request Feb 7, 2016
@JonRowe JonRowe merged commit 6350b3a into master Feb 7, 2016
@JonRowe JonRowe deleted the fix-drb-weirdness branch February 7, 2016 10:44
MatheusRich pushed a commit to MatheusRich/rspec-core that referenced this pull request Oct 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants