rails/rails — pull request #12382 by alediaferia (2013-09-27 09:32:01+00:00)
Title: Hotfix/send file live issue

This addresses issue #12381

ActionController::Live::response_body= method calls

response.stream.close

without actually checking for the stream instance to implement close method.
This is an issue when using send_file which sets a FileBody instance as response_body and doesn't have a close method.

Calling response.close fixes the issue because the base implementation (ActionDispatch::Response) actually closes the stream checking via respond_to(:close) and so avoiding any NoMethodError exception.