diff options
author | Eric Wong <normalperson@yhbt.net> | 2012-06-07 14:36:35 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2012-06-07 14:43:09 -0700 |
commit | 506df98df1dae59281fbb3b3c2c6bea7549a2288 (patch) | |
tree | 792e532e9daa4d89f6ce6006ec8f2eedd6869fcf | |
parent | bd7236fe23c4388d2fa42a4f836aca3c796dabab (diff) | |
download | raindrops-506df98df1dae59281fbb3b3c2c6bea7549a2288.tar.gz |
"send" is more likely to be overridden in subclasses whereas the Ruby runtime (at least 1.9.3) will warn loudly if any user code (re)defines the "__send__" method. For example, BasicSocket#send and UDPSocket#send in the Ruby stdlib are wrappers for the send(2)/sendto(2) system calls, and it's entirely possible an application could return a Socket-subclass as a Rack response body.
-rw-r--r-- | lib/raindrops/middleware/proxy.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/raindrops/middleware/proxy.rb b/lib/raindrops/middleware/proxy.rb index ce634bb..1cf437c 100644 --- a/lib/raindrops/middleware/proxy.rb +++ b/lib/raindrops/middleware/proxy.rb @@ -35,6 +35,6 @@ class Raindrops::Middleware::Proxy # Avoid breaking users of non-standard extensions (e.g. #body) # Rack::BodyProxy does the same. def method_missing(*args, &block) - @body.send(*args, &block) + @body.__send__(*args, &block) end end |