aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_controller/metal/live.rb4
-rw-r--r--actionpack/test/dispatch/live_response_test.rb6
2 files changed, 10 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/metal/live.rb b/actionpack/lib/action_controller/metal/live.rb
index d8fe43b5af..bba75b22fd 100644
--- a/actionpack/lib/action_controller/metal/live.rb
+++ b/actionpack/lib/action_controller/metal/live.rb
@@ -72,6 +72,10 @@ module ActionController
super
end
+ def merge(other)
+ self.class.new @response, __getobj__.merge(other)
+ end
+
def to_hash
__getobj__.dup
end
diff --git a/actionpack/test/dispatch/live_response_test.rb b/actionpack/test/dispatch/live_response_test.rb
index 87a6b1383d..153f58c42c 100644
--- a/actionpack/test/dispatch/live_response_test.rb
+++ b/actionpack/test/dispatch/live_response_test.rb
@@ -8,6 +8,12 @@ module ActionController
@response = Live::Response.new
end
+ def test_header_merge
+ header = @response.header.merge('Foo' => 'Bar')
+ assert_kind_of(ActionController::Live::Response::Header, header)
+ refute_equal header, @response.header
+ end
+
def test_parallel
latch = ActiveSupport::Concurrency::Latch.new