diff options
author | Genadi Samokovarov <gsamokovarov@gmail.com> | 2015-03-05 15:53:49 +0200 |
---|---|---|
committer | Genadi Samokovarov <gsamokovarov@gmail.com> | 2015-03-05 17:39:22 +0200 |
commit | 8ed0b89bbdfa73740e00ddb2a001e0df947b6ef9 (patch) | |
tree | 1fab48935117807011e1b13125b5d20ba1d4d9ba /actionpack/lib | |
parent | d969405acd98a6e6b39391e45fc3803fd3f26d32 (diff) | |
download | rails-8ed0b89bbdfa73740e00ddb2a001e0df947b6ef9.tar.gz rails-8ed0b89bbdfa73740e00ddb2a001e0df947b6ef9.tar.bz2 rails-8ed0b89bbdfa73740e00ddb2a001e0df947b6ef9.zip |
Revert work arounds for upstream Ruby 2.2.0 kwargs bug
The bug caused a segfault and you can find more info about it at:
https://bugs.ruby-lang.org/issues/10685.
We did a couple of work arounds, but 2.2.1 rolled out and those aren't
needed anymore.
Here are the reverted commits:
- Revert "Work around for upstream Ruby bug #10685",
commit 707a433870e9e06af688f85a4aedc64a90791a64.
- Revert "Fix segmentation fault in ActionPack tests",
commit 22e0a22d5f98e162290d9820891d8191e720ad3b.
I'm also bumping the Ruby version check to 2.2.1 to prevent future
segfaults.
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/http/response.rb | 4 | ||||
-rw-r--r-- | actionpack/lib/action_dispatch/testing/test_response.rb | 2 |
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? |