From 8275cfb20fda9c89c5b8d7fc17f9f88822fc34d2 Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Wed, 7 Oct 2015 14:43:47 -0500 Subject: [PATCH] Use Array() instead of Array.wrap --- lib/action_cable.rb | 1 - lib/action_cable/connection/base.rb | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/action_cable.rb b/lib/action_cable.rb index 49f14b51bc..d2c5251634 100644 --- a/lib/action_cable.rb +++ b/lib/action_cable.rb @@ -8,7 +8,6 @@ require 'active_support' require 'active_support/json' require 'active_support/concern' require 'active_support/core_ext/hash/indifferent_access' -require 'active_support/core_ext/array/wrap' require 'active_support/core_ext/module/delegation' require 'active_support/callbacks' diff --git a/lib/action_cable/connection/base.rb b/lib/action_cable/connection/base.rb index a2ef99dff4..5bf7086b60 100644 --- a/lib/action_cable/connection/base.rb +++ b/lib/action_cable/connection/base.rb @@ -172,7 +172,7 @@ module ActionCable origin_host = URI.parse(env['HTTP_ORIGIN']).host allowed = if server.config.allowed_request_origins.present? - Array.wrap(server.config.allowed_request_origins).include? origin_host + Array(server.config.allowed_request_origins).include? origin_host else request.host == origin_host end