From 2a78d6f561e98684a4988cdc616c6096cd4302d1 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Fri, 5 Sep 2014 13:33:20 -0700 Subject: Deprecate implicit AD::Response splatting and Array conversion --- actionpack/CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'actionpack/CHANGELOG.md') diff --git a/actionpack/CHANGELOG.md b/actionpack/CHANGELOG.md index e250450a76..de9722c392 100644 --- a/actionpack/CHANGELOG.md +++ b/actionpack/CHANGELOG.md @@ -1,3 +1,16 @@ +* Deprecate implicit Array conversion for Response objects. It was added + (using `#to_ary`) so we could conveniently use implicit splatting: + + status, headers, body = response + + But it also means `response + response` works and `[response].flatten` + cascades down to the Rack body. Nonsense behavior. Instead, rely on + explicit conversion and splatting with `#to_a`: + + status, header, body = *response + + *Jeremy Kemper* + * Don't rescue `IPAddr::InvalidAddressError`. `IPAddr::InvalidAddressError` does not exist in Ruby 1.9.3 -- cgit v1.2.3