Permalink
Browse files

fix EM Synchrony PATCH and OPTIONS methods

  • Loading branch information...
1 parent bd59f51 commit 7f9df7a08bedf5938fb63c2e59c4011ceaaf1585 @mislav mislav committed Aug 16, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/faraday/adapter/em_synchrony.rb
View
4 lib/faraday/adapter/em_synchrony.rb
@@ -71,7 +71,9 @@ def call(env)
# add missing patch(), options() methods
EventMachine::HTTPMethods.module_eval do
- ([:patch, :options] - instance_methods).each do |type|
+ [:patch, :options].each do |type|
+ next if method_defined? :"a#{type}"
+ alias_method :"a#{type}", type if method_defined? type
module_eval %[
def #{type}(options = {}, &blk)
f = Fiber.current

0 comments on commit 7f9df7a

Please sign in to comment.