aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorSean Griffin <sean@seantheprogrammer.com>2015-03-05 10:58:16 -0700
committerSean Griffin <sean@seantheprogrammer.com>2015-03-05 10:58:16 -0700
commitf18b5fe9b1a57d0ec0a3631000fce168b33e1e54 (patch)
treeee81810ed12a88bc7af7e3c501d822f37d8e43b2 /actionpack
parentd2a9bd1ae4a3c53c44a58f810877ba44f714033f (diff)
parent8ed0b89bbdfa73740e00ddb2a001e0df947b6ef9 (diff)
downloadrails-f18b5fe9b1a57d0ec0a3631000fce168b33e1e54.tar.gz
rails-f18b5fe9b1a57d0ec0a3631000fce168b33e1e54.tar.bz2
rails-f18b5fe9b1a57d0ec0a3631000fce168b33e1e54.zip
Merge pull request #19215 from gsamokovarov/revert-ruby-2-2-0-kwarg-crash-workarounds
Revert work arounds for upstream Ruby 2.2.0 kwargs bug
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_dispatch/http/response.rb4
-rw-r--r--actionpack/lib/action_dispatch/testing/test_response.rb2
2 files changed, 2 insertions, 4 deletions
diff --git a/actionpack/lib/action_dispatch/http/response.rb b/actionpack/lib/action_dispatch/http/response.rb
index 5fe544c60c..a895d1ab18 100644
--- a/actionpack/lib/action_dispatch/http/response.rb
+++ b/actionpack/lib/action_dispatch/http/response.rb
@@ -113,9 +113,7 @@ module ActionDispatch # :nodoc:
# The underlying body, as a streamable object.
attr_reader :stream
- # Ruby 2.2 bug https://bugs.ruby-lang.org/issues/10685 prevents
- # default_headers from being a keyword argument.
- def initialize(status = 200, header = {}, body = [], default_headers = self.class.default_headers)
+ def initialize(status = 200, header = {}, body = [], default_headers: self.class.default_headers)
super()
header = merge_default_headers(header, default_headers)
diff --git a/actionpack/lib/action_dispatch/testing/test_response.rb b/actionpack/lib/action_dispatch/testing/test_response.rb
index 527784885c..a9b88ac5fd 100644
--- a/actionpack/lib/action_dispatch/testing/test_response.rb
+++ b/actionpack/lib/action_dispatch/testing/test_response.rb
@@ -7,7 +7,7 @@ module ActionDispatch
# See Response for more information on controller response objects.
class TestResponse < Response
def self.from_response(response)
- new response.status, response.headers, response.body, nil
+ new response.status, response.headers, response.body, default_headers: nil
end
# Was the response successful?