Skip to content

Commit 3eb8493

Browse files
committed
Add #<< alias for #write to ActionDispatch::Response::Buffer
This makes the stream object a closer analog of an `IO`. on-behalf-of: @Cofense <[email protected]>
1 parent c6b227b commit 3eb8493

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

actionpack/lib/action_dispatch/http/response.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ def write(string)
126126
@response.commit!
127127
@buf.push string
128128
end
129+
alias_method :<<, :write
129130

130131
def each(&block)
131132
if @str_body

0 commit comments

Comments
 (0)