summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-04-14 15:58:16 +0200
committerDouwe Maan <douwe@gitlab.com>2015-04-14 15:58:28 +0200
commit076494646d30cefd396e0d6a0ae879a31aecb454 (patch)
tree121ba2380ffd01bcca27af6040faf7a5bb8842bf
parent1221bec56ca7d3bf1ba3b09e7a283ff5c11449f2 (diff)
downloadgitlab-ce-sstanovnik-openssh_fix.tar.gz
Simplify regex.sstanovnik-openssh_fix
-rw-r--r--lib/gitlab/key_fingerprint.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/gitlab/key_fingerprint.rb b/lib/gitlab/key_fingerprint.rb
index 550b10a4c94..baf52ff750d 100644
--- a/lib/gitlab/key_fingerprint.rb
+++ b/lib/gitlab/key_fingerprint.rb
@@ -27,10 +27,10 @@ module Gitlab
return nil unless cmd_status.zero?
# 16 hex bytes separated by ':', optionally starting with "MD5:"
- fingerprint_match = cmd_output.match(/(MD5:)?(?<fingerprint>(?:\h{2}:){15}\h{2})/)
- return nil unless fingerprint_match
+ fingerprint_matches = cmd_output.match(/(MD5:)?(?<fingerprint>(\h{2}:){15}\h{2})/)
+ return nil unless fingerprint_matches
- fingerprint_match[:fingerprint]
+ fingerprint_matches[:fingerprint]
end
private