Skip to content

Commit

Permalink
Remove to_ary from RackBody
Browse files Browse the repository at this point in the history
It was added in 66f8997 to be compatible with Rack::ContentLength.
However, to_ary was removed from Rack::Response in 2.1.0, and
Rack::ContentLength stopped checking for response bodies to define
to_ary in 2.2.0. In addition, Rack 3 will eventually require response
bodies that define to_ary to have a proper return value.

Since the minimum supported Rack version is already 2.2.0, to_ary can
be safely removed now.
  • Loading branch information
skipkayhil committed Apr 24, 2022
1 parent 29daa0b commit 7777a11
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions actionpack/lib/action_dispatch/http/response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -502,10 +502,6 @@ def respond_to?(method, include_private = false)
def to_path
@response.stream.to_path
end

def to_ary
nil
end
end

def handle_no_content!
Expand Down

0 comments on commit 7777a11

Please sign in to comment.