Skip to content


Ensure em-synchrony HTTPMethods inclusion. #166

merged 1 commit into from

2 participants


In a project I use em-synchrony without em-synchrony/em-http inclusion. Since Webmock considers EM::Synchrony's HTTPMethods included as soon as EM::Synchrony constant is present, but no methods really overridden that leads to a can't yield from root fiber exception.

Overriding EM::HTTPMethods by Webmock is not really needed when they were not overridden by em-synchrony/em-http. The only way to figure it out I can imagine is to inspect existing HTTPMethods for inclusion of methods defined by em-synchrony/em-http.

I'm really sorry for the lack of test, but I don't see a way to make properly.

@bblimke bblimke merged commit 712d7b5 into bblimke:master

Looks good. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 3, 2012
  1. @oruen
This page is out of date. Refresh to see the latest.
2  lib/webmock/http_lib_adapters/em_http_request/em_http_request_1_x.rb
@@ -27,7 +27,7 @@ def self.disable!
module EventMachine
- if defined?(Synchrony)
+ if defined?(Synchrony) && HTTPMethods.instance_methods.include?(:aget)
# have to make the callbacks fire on the next tick in order
# to avoid the dreaded "double resume" exception
module HTTPMethods
Something went wrong with that request. Please try again.