diff options
author | Joshua Peek <josh@joshpeek.com> | 2010-01-04 19:46:21 -0600 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2010-01-04 19:46:21 -0600 |
commit | 3f28e0bda6386ed25d07182dd39b84f6a7d330da (patch) | |
tree | ed8c45a6cc2a179a7c4786348fd09e81f89984ce /actionpack/lib/action_dispatch/middleware/string_coercion.rb | |
parent | 76b5f18feba3f1d0507b4c4ec34d11d9bb1c493c (diff) | |
download | rails-3f28e0bda6386ed25d07182dd39b84f6a7d330da.tar.gz rails-3f28e0bda6386ed25d07182dd39b84f6a7d330da.tar.bz2 rails-3f28e0bda6386ed25d07182dd39b84f6a7d330da.zip |
Trash string coercion rack hacks
Diffstat (limited to 'actionpack/lib/action_dispatch/middleware/string_coercion.rb')
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/string_coercion.rb | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/string_coercion.rb b/actionpack/lib/action_dispatch/middleware/string_coercion.rb deleted file mode 100644 index 232e947835..0000000000 --- a/actionpack/lib/action_dispatch/middleware/string_coercion.rb +++ /dev/null @@ -1,29 +0,0 @@ -module ActionDispatch - class StringCoercion - class UglyBody < ActiveSupport::BasicObject - def initialize(body) - @body = body - end - - def each - @body.each do |part| - yield part.to_s - end - end - - private - def method_missing(*args, &block) - @body.__send__(*args, &block) - end - end - - def initialize(app) - @app = app - end - - def call(env) - status, headers, body = @app.call(env) - [status, headers, UglyBody.new(body)] - end - end -end |