Skip to content

Commit 8c10e58

Browse files
committed
2.4 compatability
1 parent 5b5bb99 commit 8c10e58

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/pusher/client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ def trigger_params(channels, event_name, data, params)
426426
channels = Array(channels).map(&:to_s)
427427
raise Pusher::Error, "Too many channels (#{channels.length}), max 10" if channels.length > 10
428428

429-
encoded_data = if channels.any?(/^private-encrypted-/) then
429+
encoded_data = if channels.any?{ |c| c.match(/^private-encrypted-/) } then
430430
raise Pusher::Error, "Cannot trigger to multiple channels if any are encrypted" if channels.length > 1
431431
encrypt(channels[0], encode_data(data))
432432
else

0 commit comments

Comments
 (0)