From 1711b0d589abfce9a38d7400e5b0262f75638a65 Mon Sep 17 00:00:00 2001 From: Holger Just Date: Thu, 21 Sep 2017 22:34:47 +0200 Subject: [PATCH] Resolve Ruby warning in spec for Rackstash::Encoders::Logstash This resolves the following warning: > spec/rackstash/encoders/logstash_spec.rb:18: warning: ambiguous first > argument; put parentheses or a space even after `/' operator --- spec/rackstash/encoders/logstash_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/rackstash/encoders/logstash_spec.rb b/spec/rackstash/encoders/logstash_spec.rb index 28a4395..4aeb6f8 100644 --- a/spec/rackstash/encoders/logstash_spec.rb +++ b/spec/rackstash/encoders/logstash_spec.rb @@ -15,7 +15,7 @@ describe Rackstash::Encoders::Logstash do it 'formats the passed event hash as a JSON string and includes @version' do event = { 'hello' => 'world', 'message' => ["hello\n", "world"] } expect(encoder.encode(event)) - .to match /\A\{"hello":"world","message":"hello\\nworld","@version":"1","@timestamp":"\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d\.\d{6}Z"\}\z/ + .to match(/\A\{"hello":"world","message":"hello\\nworld","@version":"1","@timestamp":"\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d\.\d{6}Z"\}\z/) end end end