Commit d22f323a authored by Daniel Gerhardt's avatar Daniel Gerhardt

Restore Ruby 2.3 compatibility

* Use match instead match?
parent 3bae36a6
Pipeline #21316 failed with stages
in 22 seconds
......@@ -28,7 +28,7 @@ class EmojiChecker
end
def includes_emoji?(text)
return false unless text.match?(LIKELY_EMOJI)
return false unless text.match(LIKELY_EMOJI)
@emoji.any? { |emoji| text.include?(emoji) }
end
......@@ -167,7 +167,7 @@ def lint_commits(commits)
failures = true
end
if commit.message.match?(unicode_emoji_regex)
if commit.message.match(unicode_emoji_regex)
fail_commit(
commit,
'Avoid the use of Unicode Emoji. ' \
......@@ -178,7 +178,7 @@ def lint_commits(commits)
failures = true
end
if commit.message.match?(%r(([\w\-\/]+)?(#|!|&|%)\d+))
if commit.message.match(%r(([\w\-\/]+)?(#|!|&|%)\d+))
fail_commit(
commit,
'Use full URLs instead of short references ' \
......
......@@ -132,7 +132,7 @@ class AutomatedCleanup
end
def ignore_exception?(exception_message, exceptions_ignored)
exception_message.match?(/(#{exceptions_ignored})/)
exception_message.match(/(#{exceptions_ignored})/) != nil
end
def print_release_state(subject:, release_name:, release_date:, action:, release_status: nil)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment