aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2016-09-28 01:10:44 +0900
committerKazuki Yamaguchi <k@rhe.jp>2016-09-28 11:40:46 +0900
commitc3da84ff9af57dc61dff84a64fc01eefdbe21ceb (patch)
tree029c424f8e9fc2db5da9734bfcbe0fbb00d873c0 /test
parent23f83bf39058d953fa5d5039745788c0f5ca95b1 (diff)
downloadruby-openssl-c3da84ff9af57dc61dff84a64fc01eefdbe21ceb.tar.gz
test/test_ssl: suppress syntax warning
Add parentheses around regexp literals to suppress "ambiguous first argument; put parentheses or a space even after `/' operator" warning.
Diffstat (limited to 'test')
-rw-r--r--test/test_ssl.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/test_ssl.rb b/test/test_ssl.rb
index 8b4c090b..7f0b939c 100644
--- a/test/test_ssl.rb
+++ b/test/test_ssl.rb
@@ -656,7 +656,7 @@ class OpenSSL::TestSSL < OpenSSL::SSLTestCase
ssl = OpenSSL::SSL::SSLSocket.new(sock, ctx)
ssl.hostname = "foo.example.com"
ssl.connect
- assert_match /^ADH-/, ssl.cipher[0], "the context returned by servername_cb is used"
+ assert_match (/^ADH-/), ssl.cipher[0], "the context returned by servername_cb is used"
assert_predicate ctx3, :frozen?
ensure
sock.close
@@ -667,7 +667,7 @@ class OpenSSL::TestSSL < OpenSSL::SSLTestCase
ssl = OpenSSL::SSL::SSLSocket.new(sock, ctx)
ssl.hostname = "bar.example.com"
ssl.connect
- assert_not_match /^A(EC)?DH-/, ssl.cipher[0], "the original context is used"
+ assert_not_match (/^A(EC)?DH-/), ssl.cipher[0], "the original context is used"
ensure
sock.close
end